Software Design Strategies

For this blog I chose an article on Tutorials Point called “Software Design Strategies”. I chose this because I have used tutorialspoint.com looking things up for projects in the past and I found their content very helpful. I chose this write up particularly because I want to get a foundation of design strategies before I continue to dive into specific ones.

To begin, it’s important to understand what software design is in its most basic form. It is the process of taking user requirements and then planning and implementing them with the optimal solution.  The design aspect is really HOW you choose to implement. There are a few major variants considered in software design. They include structured design, object oriented, and function oriented. Structured design focuses most on designing a solution which gives better understanding to how the problem can be solved. The primary problem is broken down into smaller problems which are solved with solution modules and then these modules are aligned in a hierarchy to communicate and solve the larger problem. Key traits of an effective structure design are high cohesion and low coupling arrangements. Function oriented design is considered to be a system which contains smaller sub-systems called functions. Every function should complete a task which is important to the system as a whole. Dividing functions up gives a means for abstraction because the functions can hide data and the underlying operation as they communicate with each other. When using function oriented design, usually you would use a data flow diagram to map out the main system as well as break it down at the function level. Object oriented design focuses on entities (called objects) and their characteristics. Objects are defined in classes which lay out attributes and methods giving the object its functionality. Other key traits that are important to object oriented design include inheritance, polymorphism, and encapsulation. When using this strategy it is important to define a class hierarchy. This determines relationships among the classes.

After reading this article I feel that I have a better understanding of the foundations of software design. The three strategies that were mentioned are important to understand because it gives options to how you are able to meet software’s requirements.  It seemed like the three strategies were discussed in order from least complex to most. If I had a difficult problem or set of requirements to meet, object oriented design would be my choice. If I had a problem which was mainly input and output I would go with the structured design as long as I did not need to hide implementation. In conclusion I think it’s important to make a conscious decision to what design method you are going to use from the beginning. Otherwise when you start implementing requirements, you may find your design to be less than optimal. As we move through the semester I plan to try and identify the base level of design for the code that we will work with.

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

Thoughts on “Rethinking Equivalence Class Partitioning, Part 1”

In his blog post, James Bach picks apart the Wikipedia article on equivalence class testing (ECT) as a way to explain the way in which ECT acts as a heuristic founded on logic rather than a rigid procedure that applies only to computer science.

His main points are:

A) That ECT is not purely based on input partitioning, nor is it purely based in computer science.  It comes from logical partitioning of sets.

B) That ECT is useful for dividing inputs (and outputs) into groups which are likely to expose the same bug in a system.

C) That ECT is about prioritization of bugs rather than exhaustive exposure.

In essence, he states that equivalence class testing is not an algorithm used to generate test cases, but a heuristic technique used to partition conditions such that they reveal the most important bugs first.

I chose this article because it relates to equivalence class testing (which we covered recently in class) and also refutes points made by a resource commonly used for basic knowledge.  I (and I think many other students) frequently use Wikipedia for summaries of subjects, and getting an expert opinion on what’s wrong with that kind of source helps deepen understanding of why they need to at the very least be supplemented by more nuanced sources.  It moves my understanding beyond the high school teacher’s decree of “DO NOT USE WIKIPEDIA IT IS NOT A GOOD SOURCE”.

While I think that picking apart the phrasing and wording of specific passages from a Wikipedia article is needlessly pedantic, I also think it’s important to critically interrogate sources of “common knowledge”.  When it comes to testing, it is necessary to understand the ways in which techniques are grounded in needs and conditions outside of just the code.  A tester should not only know how to test but also why those tests are used and what they are best at uncovering.  Bach’s article helped me think about why we test things, why we use the techniques that we use, and what we hope to get out of them.  When it comes to ECT, we partition conditions into classes in order to make a model of the ways in which the product under testing behaves.  The model can and should be modified through the testing process; conditions can be grouped differently in order to reveal different bugs.  Back presents ECT as well as other techniques as a fallable but important tool, and I think that’s good to keep in mind as I learn more about testing.

Link to blog post.

 

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

UML Diagram Types Explained in Further Detail

I blogged a bit last week about the functionality and purpose of Unified Modeling Language (UML). Since we’re still discussing the topic in class, I figured this would be a good opportunity to give a more in-depth account on the subject. I just finished reading an informative article from SmartDraw that offered me some additional insight regarding UML; it’s appropriately entitled “Everything You Need to Know about UML Diagrams.”

Some of the main topics discussed in SmartDraw’s article are: what a UML Diagram is, why we use UML, and types of UML diagrams.

SmartDraw’s article begins by explaining that the UML gives us the capability of visualizing programs through a series of diagrams. Originally developed for the purpose of Object Oriented Design, UML has worked its way into being implemented in many other forms of Software Development as well. We use UML diagrams to provide clear and ubiquitous visual explanations to our projects. The goal of UML is to help increase efficiency and team productivity.

SmartDraw indicates that UML diagrams can generally be divided into two main categories: Structural and Behavioral. Structural diagrams tend to focus on the physical attributes of a program or system, whereas behavioral diagrams are more interested in the consequences and responses from the actions within our structure.

Both groups include several other subcategories which, with the help of SmartDraw’s article, I will attempt to summarize some of which I have found particularly interesting.

Structural:

  • Class Diagram: the “backbone” of almost every object-oriented method, it shows how certain classes, objects, attributes, and operations are related to each other.
  • Object Diagram: describe the static structure of a system at a given time; can test class diagrams to ensure accuracy.
  • Component Diagram: describe the organization of physical software, including source code, run-time (binary) code, and executables. It describes the organization and wiring of physical components within a system.

Behavioral:

  • Activity Diagram: illustrate the flow of control from one activity to the next. Typically used to model the internal operation of workflow.
  • Sequence Diagram: also called an event diagram, describe interactions among classes by means of periodic message exchanges.  It provides good visualization and validation among a variety of runtime situations.
  • Use Case Diagram: models functionality using “actors” and provides descriptions of results for every possible action by these actors.

SmartDraw’s article went into great detail about UML, providing explanations of its purpose and why we use it. It also elaborated on several different subcategories of Structural and Behavioral UML diagrams. This article made me think of how important these diagrams seem to be in Software Development in general; they’re our blueprints for developing software. A contractor likely wouldn’t even think about building a house without a blueprint, so it seems to me that a Software Developer should adhere to that same advice.

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

Future of Testing: From the Experts

While looking for a quality blog to share with you, I came across one from QA Symphony about the future of software testing from the eyes of experts. It can be found here: https://www.qasymphony.com/blog/5-trends-future-software-testing/ .

I have never actually met an expert software tester or anyone that is solely that, a tester. So when I saw a blog that interviewed 12 of the supposed best software testing experts around, I thought I could learn a thing or two from them.

The blog is written in categories, so it is easy to read and understand exactly what they are talking about. I also really enjoyed the setup of the tabs on the left side.

Anyways, the blog is mainly about the upcoming changes and what we are going to have to do as software testers to keep up with the tempo.

The categories the blog includes talks about automation, up and coming tech., willingness to adapt and learn, blurry lines, and how skill sets will bear the test of time. Below, I have pulled out some of the information from the blog that I thought would be useful to know.

Automation

All of the experts that were interviewed agreed that automation is extremely important in the field of testing. However, most of them stated that it is a dangerous place to “over-automate”. The compromise that the experts talked about that I will be keeping in mind is that automation should be used to free up some time to explore into your testing further. Don’t get lazy.

Up and Coming Technology

The biggest focus in this section was machine learning and AI. One of the experts, Seghal, states “these technologies will give us an additional layer of automation. They will become prescriptive, they will augment testing and they will become self-adaptive.”

This is obviously huge in the area of testing. To have a computer learn the best way to test a certain program and then do it for you without even asking? Sounds like a dream, too good to be true. But it really isn’t!

While the experts talk about how hopeful these technologies can be, they also talk about the challenges they will cause, which the next section covers.

Willingness to adapt and learn

One of the experts, Suma Daniel says “To succeed in the future, testers need to be willing to adapt and learn new technologies and embrace more fluid development cycles, such as DevOps.”

Always question the way you are testing, if you think you can do better, than try and do better. This blog emphasizes that you should invest yourself in your company and try to improve and advance to be better than before. You would think this is obvious, but some testers just don’t think the same way as developers.

Lines will get blurred

All this means is that when you are testing, you should be working very closely with the people creating the software. Have communication and be ready to work in a development environment rather than just a production environment.

Skills bear the test of time

With all this said about new technology, don’t forget about the human touch.”Critical thinking, communication and interactional expertise are vital to being valuable to your business and managing risk.” I think this is my favorite part because those basic skills are extremely vital to your success as a software tester.

 

From the blog CS@Worcester – Rookey Mistake by Shane Rookey and used with permission of the author. All other rights reserved by the author.

The basis from Refactoring

In the world of computing, many computer users have been in a state of cleaning up code whenever it is a task, a project, or even just for the sake of the product. This state is called refactoring in which I have decided to read about. So for this first week of blog development, I have chosen to read “Refactoring is About Features” from Code Simplicity. The reason that I have chosen this blog post because as a programmer, I have only heard the word refactoring a few times from doing coding projects in classes and the questions on my mind was: why is “refactoring” important and how does the word come into the ideals of coding. I wanted to know more on how the concept of refactoring and the ideas around it.

This blog post basically goes over the ideas of refactoring and principles of having to refactor. So, by the definition providing by the author, refactoring is an organizational process that you go through in order to make production possible. When it comes to refactoring, you want to be sure the service from it is really making progress. Variety of problems will occur if refactoring isn’t going into real production. On the other hand, if a system was produced and reorganizing was never done, production of the actual product becomes difficult or impossible. Both of these tasks have to be done in order for the product to be produced reliably and quickly while having the system be organized in an effective way. The principles are to refactor a feature service, have the system be in better condition and not worry about being “perfect” but better designed for an intended purpose. If organization is left out, the product is not as envisioned, and if production is left out, then the reason for doing refactoring is not even there anymore. So the overall message is while it’s nice to add new codes, clean up the real obstacles for the intended design to be a reality.

So based on the content the blog post provided with analogies of the real world experience, I would say this was great to read. The author provided some ideas of knowing what purpose of the overall product would be from refactoring and giving tips that shows cleaning development directly and indirectly.  From my experience when it comes to cleaning up coding, my mindset would be writing the implied codes that is needed to be clarified and then write a bit of documentation that which shows as much the code is used up to a certain point. In this way, it gives an insight on the structure of the overall design and then like discussions can be made when I ask peers if the piece of code can serve this purpose or even help in finding the real problem.

From this blog about refactoring, I learned is that always be aware to change the design from being not serving an uneventful state to a design with the very current purpose can do with the piece of code it has as it leads to greater productivity and less redundancy. Learning the ideas about refactoring from this blog gives me the reality of seeing that for myself, there should be a boundary in cleaning up coding as I see fit. The reason I say this is while my experience seems to work, I must be aware there should be consistency with using this method and sometimes people do not want to see the same method repeatedly. So I hope to use the knowledge I learned from this blog and build upon it to be flexible within my skills in coding.

-Dennis Tran

Link to the blog: http://www.codesimplicity.com/post/refactoring-is-about-features/

From the blog CS@Worcester – Onwards to becoming an expert developer by dtran365 and used with permission of the author. All other rights reserved by the author.

Quality Software Design

Note: I don’t use Emojis in plain text, so I label my reactions a specific way
I denote it the following way as to give the reader a sense of my personal mental thoughts or reactions towards something. It’s kind of like an Emoji… Except its just boring text! [:laughing:]

Sub-note: Apologies for not updating for this class for a few classes. I’m working to get back on track!
We begin today by speaking of good software design. Lets talk about it.

Some qualities of good software design? One quality that well-made software have against poorly-made software is that it shows a large variety of functions and features related to its purpose. Another is the ability to add new features seamlessly. Java allows us to do this throughout its classes. These classes can interact with one another, have many variables and many different methods (or functions.)

Java is a well chosen example of a good software designer, as it allows for easy creation of objects and systems that work together to make one whole large system. It also allows for massive levels of modification and for addition or deletion of content on a whim. It is all up to the programmer!


There are also difficulties to come with the advancements seen in Java. One must learn of its many ins and outs to be able to successfully conjure up oneself a piece of beautiful software!


Lets say we have a player class, and it has methods that pertain to a player of a video game. Then, a character inherits or extends this class, but overrides unnecessary methods within the class. The player class is a interface if its subclass inherits from it, and if a subclass inherits from it, its an interface.

Otherwise, the player class is an abstract class. An abstract class has its subclass extend from it.


In the big picture (according to our professor Dr. Wursts slide) there are two main things to consider: the IS-A relations and the HAS-A relations. The person class is a class. The person class has a method/s and variable/s.

Mainly, today we have been talking a lot about the things we can do in a Java-based system. I know I haven’t been as detailed as my last few posts, but regardless, I hoped you enjoyed the read!
(goodness even the caffeine could not drive me to write well today! [:laughing:] )

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

Six Pitfalls In Testing

A recent blog post I read is entitled “Six Things That Go Wrong With Discussions About Testing”.  It is a post from August 27, 2017 on James Bach’s blog http://www.satisfice.com/blog/ .  In it James Bach talks about six big pitfalls that developers fall into when thinking about and talking about testing.  I chose this blog post because after reading it the information stuck with me.  He takes a step back from testing and writing tests and talks more about how to effectively test.  I thought it was a good topic that a lot of testers and developers overlook.  The first point is that people care too much about the number of test cases and losing focus on writing effective test cases.  This is a sound piece of advise to remember especially in college before getting too far into a career in software development; it’s more important to write a few strong tests than to write a lot of weak tests.  The second is that people treat a test as an object rather than an event.  This one interested me a lot.  It’s a good way to look at tests.  A test isn’t just an object, it is an activity and no test will be the same between two testers.  The third topic he talks about is when testers can’t describe their test strategy.  It’s a good reminder that as testers we need to constantly reevaluate our testing strategies and adjust it as necessary.  When we don’t step back and check ourselves we stop progressing.  The fourth point is that people talk about testing as if it is an automated process.  When we do that as testers it removes the human aspect of creating the tests.  This creates a division between testers and the tests.  We start to stop taking responsibility when a test doesn’t go right and that responsibility is important to have in order to learn from mistakes in testing and get better.  The fifth is when people talk as though there is only one kind of test coverage.  Even if a tester develops their own style and favors one type of test coverage during their career, it is important to remember that there are many kinds and a tester should keep them in the back of his mind so they can be ready to switch to the most effective kind depending on the situation.  The final pitfall is when people talk about testing as if it is static.  This is a fundamental concept that, in my opinion, should apply to almost all aspects in life.  When you think you are done improving then you are.  A good tester needs to always be open to new ideas and ways of doing things.  That mentality helps a tester to improve and avoid becoming stagnant. Which fits perfectly since thats the idea behind this assignment of blog posts.

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

Commenting

Source: http://blog.cleancoder.com/uncle-bob/2017/02/23/NecessaryComments.html

Recently, I read up on the blog cleancoder, by Robert C. Martin on Necessary Comments. The blog talks about how having a comment on every single piece of code that you wright is unnecessary. He says that when coding adding comments should be a last resort. He later even gives a good example of when this should be used. He was working with another member of his team for an improvement for their website. Whenever a customer purchases a video from their website it would then also find all the videos that had been purchased by others who had bought that video, and would pick the most popular and recommend it to the customer. They did not want the customer to wait forever for the suggestions so they decided to put the long running functions into another function that would return the previous result from the cache and if more than the N minute had passed, would run the algorithm in a separate thread, and cache the new result. They called this function the “choke function.” However, when they were testing it and trying to improve it when they tried to have other read the code most people would not know what they were trying to do so they kept going back to the diagram and that was wasting time. So, they decided to make a longer explanation of what the code did and they also drew in a diagram. Robert said “This doesn’t happen all the time.… But it does happen; and when it does nothing can be more helpful than a well written, well thought through, comment.”

I decided to read up on the blog because I was taught to have a comment on every line. This way it is clear on what I am doing and if I make a mistake it would be easier to find where in the code it is in. After reading this blog I can see why writing comments on every single function is useless because in the real world there are people who know what you are talking about. However, if you do decide to write a comment on a function make sure it is a well written, well thought out, comment. For myself I think I will still write comments on many of my functions however if it is very simple and easy to understand I will not waste my time writing it.

From the blog CS@Worcester – The Road of CS by Henry_Tang_blog and used with permission of the author. All other rights reserved by the author.

The 5 Rules of UML

Today, I came across a blog called “UML Best Practice: 5 rules for better UML diagrams”. The blogger discusses their five rules for making better UML diagrams. The first rule; less is more. This approach helps to simplify the appearance of your diagram and helps to keep it looking neat and organized, therefore making it easier to understand. The second rule is to avoid crossings. This means to avoid intersecting your lines when establishing the relationships between classes. This goes hand in hand with the first point, as it helps to avoid a messy looking diagram. The third rule is orthogonality, which in short is using only vertical and horizontal lines to establish relationship; not using any diagonal lines. Rule number four is called “parents up” which is making sure that all parent classes are located above the child classes, so that all arrows point up, and it makes the UML diagram easier to read because it now has a natural flow. The fifth, and final, rule is simple; tidy up your work. Try to connect boxes using a single horizontal or vertical line, avoid turns in lines, and make everything uniform.

I chose this blog because I’m still learning the ways of UML, and I’ll take any tips to make it easier to draw/understand. I feel that the content, while not necessarily technical, is imperative to making and presenting good UML diagrams. Without organization, readers will get lost, lose attention, or just straight out ignore your diagram. For example, say you’re a developer. Part of being a developer is creating these UML diagrams to give to the coders so they can write your program. If your diagram is difficult to understand (intersecting lines, parent classes being located underneath the child classes, etc), the coders will have a hard time interpreting what you want done, and there’s a good chance that your program will turn out wrong. Your chances of getting a complete and correct program are much more likely if you make sure your UML diagram is clean and concise. Using these five rules will help to give your diagrams that edge, and it will create uniformity between all of your UML diagrams.

I like making things look clean cut and professional, and I hope that these five rules can help me make my UML diagrams look as good as they possibly can. I want to be able to interpret my UML diagrams with ease, and I want to be able to understand it without having to dissect every class and every branch. Following these five rules will help with this.

Here’s the link to the blog: https://geertbellekens.wordpress.com/2012/02/21/uml-best-practice-5-rules-for-better-uml-diagrams/

 

From the blog CS@Worcester – The Average CS Student by Nathan Posterro and used with permission of the author. All other rights reserved by the author.

Java Interfaces

http://tutorials.jenkov.com/java/interfaces.html

Jenkov’s article is about a core concept of java and other object-oriented programming languages; interfaces.  As basic as the concept is to programmers, it’s important to have a full understanding of such core concepts.  And that’s where I think this article excels.  It does a great job at making the information much more learn-able, digestible.  Far better than the oracle libraries, Jenkov explains how to implement and work with interfaces in projects.  His article does a good job of explaining what’s in the examples and code.  The first he speaks of, after what an interface is and how to implement it, is implementing multiple interfaces.  Unimpressive it may be, but it helped me. It’s not like the code was hard to learn or understand.  It’s just a huge help to how I learn to see everything completely explained.  Just looking at an example isn’t always helpful to me.  Although in the case of implementing multiple interfaces, it would have been.

 

Beyond just what we can do with interfaces and inheritance, he explains how interfaces relate and operate with core concepts in object-oriented programming.  Opting to discuss the usefulness of interfaces as well as how to implement them.  This portion of his work was most beneficial to me.  To not only know how to create interfaces but to also know how to use them effectively.  Paired with his explanations, he gives examples of good coding practices with interfaces.  But he doesn’t explain only what interfaces can do.  He also warns of the short comings of interfaces.

Sure, they are awesome examples of polymorphism in programming but, they can be broken.  One of the things to be cautious of is having overlapping method signatures.  Something I learned; Java classes can only implement a method with a given signature once.  Thus, having the same signature in two interfaces is a problem.  However, it shouldn’t be too much of a pain as long as the programmer remembers what they’ve already written.

Another great lesson I got from this writing was on how inheritance can work with interfaces.  I hadn’t known before that interfaces could inherit from one another and any class inheriting from a child interface got everything from the parent as well.  The article gave me a good overview on how interfaces work as well as ideas and understanding on how and when to use them.

 

From the blog CS@Worcester – W.I.P. (Something catchy) by aguillardcsblog and used with permission of the author. All other rights reserved by the author.