Category Archives: Week 5

Spending Testing Time Effectively

For this weeks blog for the topic Quality Assurance and Testing, I read an article titled “5 Reasons you are wasting your testing time.” That is not to say that testing is a waste of time, but rather as the first sentence says, “Not all our testing time is spent effectively.”

The blog goes on to list the five reasons that a programmer might be using their testing time ineffectively, which are as follows: (1) “You don’t set a clear goal for your testing task;” (2) “You don’t understand the value of the feature for your End User;” (3) “You do not keep track of what you tested, your findings and the other ideas you got while testing;” (4) “You do not consult existing information to get insights into your test;” And (5) “You do not do post-test reviews and feedback sessions with your peers.”

These are all straightforward ideas, but I’m sure most programmers testing their code have fallen into several of these, if not all. This list provides a framework to avoid these pitfalls. In class, we have been going over ways to be more methodical when testing. This list is a little more elementary than what we have covered, but it is good information to use nonetheless.

A key takeaway is to treat testing more like a science than throwing it together willy-nilly. There has to be a method to the madness. You have to know what you want the test to do. You should have a clear understanding what the end product should look like and how it should look to the end user.

The final section in the article said testing isn’t “Rocket Science, but it is not a trivial task either.” It should not be seen as something that could be done by almost everyone, which is a common belief in the industry. This is not true. It is an important job that should be done right. It requires being very organized and staying on top of things. There are many things that can be done haphazardly. Testing is not one of them.

From the blog Sam Bryan by and used with permission of the author. All other rights reserved by the author.

What is Behavior-Driven Development?

This week’s topic has to do with behavior-driven development, which a strategy of software development that focuses on the communicating narrative between developers so as to ensure that all members understand the specifications and other requirements of a program. I found an insightful article at the following website: https://airbrake.io/blog/software-design/behavior-driven-development. This blog post is one of a few in a series explaining different development techniques that work together as part of the software development life cycle.

As explained in the article, behavior-driven development, or BDD, works hand-in-hand with other strategies, such as test-driven development, which entails the execution of a failing test and then subsequently writing a minimum amount of code in order to pass the test. The BDD of tests becomes different from this technique when it relies more on the desired behavior of the program, rather than simply writing initially failing tests for all parts of the program, as utilized with test-driven development. BDD defines behavior specifications with user stories that outline various scenarios for the program to be executed or tested. These stories take on a narrative tone that states who and what are involved in each scenario, as well as the conditions that must be met in order for the scenarios to be successfully implemented. By using a common language understood and easily communicated by everyone on a development team, members can easily collaborate to define these specifications and perform tests based on the definitions given with the user stories.

This topic stuck out to me because it somewhat combined what I have been learning in both my Software Design and Software Testing courses this semester. This post discusses different methods of designing programs and their tests, and I thought that BDD clearly incorporated both, with the description of designing the behavior specifications to be met, as well as the concept of testing these specifications. We’ve somewhat been starting to take on both of these roles in the classroom by determining the purpose and desired functions of our programs, and then performing tests to ensure that the functions are working successfully. While we haven’t written out user stories to more specifically outline the behaviors, I think that this process is more implicit for us at this point.

From the blog CS@Worcester – Hi, I'm Kat. by Kat Law and used with permission of the author. All other rights reserved by the author.

Test Automation

https://abstracta.us/blog/software-testing/test-automation-patterns-and-good-practices/

This blog post discusses good practices to use with test automation. Automating tests can save time and decrease the amount of work that has to be done. Following these practices will help ensure that you get the most value out of automation.

Test Code Review

  • All levels of testing should be reviewed to examine their quality. This will help the tester discover bad practices or mismatches in the tests.

Apply Assertions

  • Assertions should be used to identify problems.
  • An assertion that’s too generic can create false negatives and false positives, so pay special attention in the definition of assertions.

Behavior-Driven Development (BDD)

  • A common language should be created for the business and engineers to be used as a starting point for development and testing.
  • User stories are defined and used as input for test cases.
  • BDD gives developers clear specifications and brings testability to a system.

Page Object Pattern for UI Testing

  • The use of design patterns increases scalability and maintainability
  • The page object pattern allows you to reuse knowledge of the structure of an application while having a minimal impact on tests.
  • This pattern strengthens tests by decoupling the structure of the user interface from the test code

Data-Driven Testing

  • With data-driven testing, automated tests are parameterized so that the same steps can be carried out with diverse amounts of test data
  • Adding data to the file creates new test cases

Parallel Execution of Tests

  • Using parallel execution options like Selenium will reduce testing time by running several tests at the same time.

I thought this blog was very interesting. While I have learned a little about test automation I haven’t used it enough to learn the best practices for it. It is important to learn these practices because the whole point of automation is to save time, and if you don’t do it correctly you will end up spending more time trying to fix your errors.

I thought the most interesting part of this post was the section on the page object pattern. This is a design pattern that I’ve never heard of. It seems to be very useful because it helps prevent you from breaking your tests when you change your code. This is a topic that I would like to learn more about and will keep in mind when I work with automated testing. Overall I thought this was a useful and well-written blog post.

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

Machine-learning system tackles speech and object recognition, all at once

http://news.mit.edu/machine-learning-image-object-recognition-0918

Speech recognition systems usually require hundreds of thousands of transcripts in order to work properly. This new model of machine learning learns through audio visual associations similar to how a child would learn, where they correlate speech with related images. The researchers then modified the model to associate specific words with specific pixels. It works by dividing the image into a grid of cells consisting of patches of pixels while dividing the audio portion into segments of the spectrogram. It then compares each image cell to each audio segment and produces a similarity score for each individual one. The researches call this comparison method a “matchmap”. One good use of this is learning translations between all of the languages on the planet. There are an estimated total of 7,000 languages spoken wordwide and only about 100 have trascription data for speech recognition. With this model, two different language speakers can describe the same image and the machine can learn the speech signals of the two languages and match the words, making them translations of one another. This is interesting because that means the model does not require actual text to learn to translate. In languages where things are not commonly written down, the machine can translate meanings where other methods that are common today cannot.

This method is important to note because machine learning is a growing topic in the world of computer science and this could open up all kinds of possibilities. It is a new and innovative way to try to solve a problem and might become something needed for future jobs or projects in life. With this matchmap system, speech recognition no longer needs to be manually taught hundreds of thousands of transcriptions and examples of those transcriptions in order to function properly. This is increasingly important since new words enter our dictionary and become common for people over time. Currently, the machine can only recognize a few hundred words but in the future it could help advance the machine learning field while also improving the speech recognition software that exists such as siri.

 

From the blog CS-443 – Timothy Montague Blog by Timothy Montague and used with permission of the author. All other rights reserved by the author.

Retreat Into Competence

Retreat Into Competence seems like the ideal apprentice pattern to apply this week. Our capstone team is in the process of discussing ideas for implementing the AMPATH application with offline capabilities. The problem is that I have become keenly aware of how complex this project is for me to even begin to understand. I’ve been noticing that my limited knowledge of Angular is certainly hindering my process. So I started to think to myself, “what can I learn more about that can help me move forward with the AMPATH project?” Then, and I’m not kidding here, I started thinking about this textbook trying to remember the name of the pattern that discussed what I should do when I feel I’m in over my head. I found it, and as the name suggests, I should Retreat Into Competence.

There’s an Angular tutorial by sitepoint that I have done portions of at least a couple of times before. It’s incredibly helpful and seems to cover every important aspect needed to develop applications in Angular. I’ve used it last semester when I first started learning both Angular and Typescript for the first time.  Now I’ve been finding myself going back to it again and again. I feel this is a great way to Retreat Into Competence because it’s something I’ve done before and become at least somewhat familiar with. Right now I’m in the process of going through the tutorial as thoroughly as possible to ensure I understand every piece of code that’s in there. I think I’ve got the CRUD (Create, Read, Update, Delete) part down, which helps boost my confidence a bit as I proceed to tackle the more complex topics. But I’m still Retreating Into Competence, and I know I have some more substantial learning to do before I can say that I’ve successfully finished applying this pattern.

Ultimately, I need to work on better understanding how the AMPATH application communicates back and forth to a remote server.  I had at least a high level understanding of the “Todo app” discussed in the sitepoint tutorial. And when I “retreated into competence” and started to go through the tutorial again in a meticulous fashion, Angular is seeming more clear to me than ever before. I am hoping to finish the sitepoint tutorial section regarding REST (Representational State Transfer) APIs before my next team meeting on Tuesday. Learning more about the workings of REST and mock servers should help provide some clarification regarding how the AMPATH server communication works. Then perhaps as the pattern suggests, I can “launch forward like a stone from a catapult” after momentarily Retreating Into Competence.

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

CS@Worcester – Fun in Function 2018-02-18 23:46:51

“The Deep End” resonated with me, not because I’ve applied the pattern before, but rather because I’ve been thrown into the deep end. When I took Data Structures at a different college over the summer, I found out the course was being taught using C, which I hadn’t yet learned. My dad accurately described the task ahead of me as, “Here’s a new [human] language. Write a novel.”

Worse, the professor was often unhelpful. The pattern, which encourages taking challenges and high-profile roles, warns that you could end up in over your head and drown in trying to apply it. I actually compared my emotional state those first couple of weeks to drowning in the middle of the ocean, because I was so out of my depth, no one could help me, and the consequences of failure were drastic. And I was failing for a while. Assignments were graded using an automated system that tended to give out 100s or 0s with no in-between, and 10 points got taken off for every day late. I fell behind and was submitting assignments late, which in turn gave me less time to work on the next one.

The Deep End identifies Find Mentors and Kindred Spirits as patterns that can be used to mitigate its risks. What eventually made me feel less like I was drowning was identifying the one tutor available for the class who seemed to know what he was doing and reaching out to him for help. He was accommodating and even offered to look at my code outside of his tutoring hours. It was, in fact, finding a mentor/kindred spirit that enabled me to salvage the situation.

Good things came of surviving the deep end. I was able to take Robotics the next semester because my knowledge of C made me feel more prepared than I would have otherwise. My Unix Systems Programming course this semester is also turning out to be much easier than it could’ve been.

The idea for action given at the end is also interesting. The writers suggest rating every project you’ve ever worked on using your own ways of measuring complexity or difficulty, and then plotting new projects that come along in a chart with the others. This seems like a good idea for making sure your career trajectory is going up and consistently challenging you instead of stagnating.

As a final note, the idea of applying this pattern by taking high-profile roles also reminded me of a principle one of my role models has: that if you’re given something you feel you don’t deserve, the answer isn’t to refuse, it’s to take it and work hard to deserve it.

From the blog CS@Worcester – Fun in Function by funinfunction and used with permission of the author. All other rights reserved by the author.

Apprenticeship Patterns: Nurture Your Passion

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

Emptying the Cup: Concrete Skills

In this section of the Apprenticeship Patterns, the term “concrete skills” was introduced. It gives us an overview of why having certain concrete skills are necessary to have, especially when you, as an apprentice, will start developing your craft in the software development team. For example, a concrete skill can be your “First Language”, where you have prior knowledge and skills on understanding the programming language and knowing how to implement it in an IDE.

“Having knowledge is not the same as having the skill and practical ability to apply that knowledge to create software applications.”

I found this idea very useful and I completely agree with it because a developer who has adequate or substantial knowledge in software development has no value in their team if they do not know how to implement their knowledge in their craft. Therefore, the develop has no value in their team, and is nothing more than a dud in the team.

“The point is that you will often require hiring managers to take a leap of faith in choosing you. Concrete skills (which are ideally discrete enough that you can bring toy implementations to an interview) allow you to meet them halfway. The concrete skills you possess are your answer to the question: “If we hire you today, what can you do on Monday morning that will benefit us?” A deep understanding of ‘Your First Language’ will help establish your credibility and should prove to be extremely useful to your team.”

This idea supports that programming languages can be an effective concrete skill to have. Programming Languages, however, are not the only concrete skills that developers may need to have. Team management, communication, and organization skills are also necessary to have in order to have an efficient and cohesive team.

Reading this Apprenticeship Pattern made me think about the development capstone class because it made me evaluate myself and my team members on where we stand in acquiring our concrete skills. Within the past couple weeks, I’ve been trying to get use to Angular by doing more of the Angular tutorials so I can be well equipped on that knowledge on how use Angular. I think that would be a great task for me to do so in case if my teammates need help on Angular, I can show them, which is how I can be become a valuable asset to the team and our success.

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

Find Mentors

It’s important to realize that the path you are taking (it doesn’t matter what path that is) has more than likely been traveled before, or at the very least where you stand at the beginning of your career is where many have stood before you.  There is no need to reinvent the wheel and learn all the ins and outs while trying to determine and travel your career path without guidance.  There is an abundance of craftsmen with a career full of information out there, whether it is your boss, a senior team member, or just someone in the field that you look up to.  What is important is that you seek them out and develop an open dialog back and forth with them so you can prosper in whatever you decide to do.  Ideally you want to find a master craftsman that has walked a good distance along the path and not someone who is only a few steps in front of you.  While you should still develop a relationship with the person in front of you, and is the basis of other apprenticeship patterns, it is not as a mentor and not the topic of this post.  Your mentor should also be ready and willing to accept the responsibility of taking on an apprentice.  It is a very fulfilling and very important relationship to develop in your career and will benefit you greatly to learn from their experience and grow as a developer.  Remember though that your mentor does not know everything though and is not infallible.  There should be a respectful, open, back and forth communication between both of you.  A communication designed not just to receive directions and blindly follow them to build your career, but one where you can ask why they made those choices in their own career or why they are recommending this course of action to you.  One that is strong enough not to crumble if you take in your mentor’s advice and in the end still decide not to follow it, but to take a different route that they may not agree with but still respect your choice.

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

Unleash Your Enthusiasm

Most apprentices like me always face problems such as frustration and discouragement from peers and even their craftsmen sometimes. It is my dream as an apprentice to excel in my learning.  Some craftsmen will always intimidate their apprentices and it takes a brave and focus apprentice to stay on track. Sometimes, it is not just the craftsmen that will give you hard time. Being in a team that dictates your contribution can cause you a lot of damage in your learning. As a first comer, those who have been in the apprenticeship for years might have the mind set of you not knowing anything yet and will not value your contributions. Also, moment you have that feeling of fear and not able to speak out your ideas, you are on your way to failure.

However, this pattern has good information that can help me as an apprentice to figure out how to deal with most situations whiles learning.  One thing I have come to notice is that you cannot meet your desired expectation if you have no passion for what you are learning. Being happy or excited of what you learning or working on will actually enable you to put much effort into achieving your goals.

I am actually surprised of what makes a better team. Even though I am aware that a team of experience members can have problem due to everybody trying to be the leader, I usually think they will still have a better result. A team with varying levels of experience is the least I can think of being successful in its activities. I also think, believing in yourself that your contribution to a team will make a difference will enable you to openly speak out. Sometimes, I try to get as much as I could from my team members by listening to all they have to offer but very careful of what information I am taking from them because more often they are either misleading or conflicting with what I knew.

Again, I am not surprise craftsmen learn from their apprentices because a good apprentice will always search for knowledge outside his confined area and when his findings are openly embrace, craftsmen will benefit from it. Reading this pattern has impacted me with ideas that will help me focus on my apprenticeship journey. I will openly unleash my enthusiasm and would never allow others or circumstances around me to dictates what I can offer to my team.

 

 

From the blog CS@Worcester – Computer Science Exploration by ioplay and used with permission of the author. All other rights reserved by the author.