Refactoring – Documentation – Software Framework

Hello dear readers. In this blog post I would like to write about Refactoring, documentation and software framework. While explaining what they are I will try define why are they needed.

Refactoring is very used term in software development and has played a major role in the maintenance of software. Refactoring is one of the most self-evident processes, but it is surprisingly difficult to perform properly. In most cases, we deviate from strict refactoring and execute an approximation of the process; sometimes, things work out and we are left with cleaner code, but other times, we get snared, wondering where we went wrong. In either case, it is important to fully understand the importance and simplicity of barebones refactoring. Refactoring is a controlled technique for improving the design of an existing code base. Its essence is applying a series of small behavior-preserving transformations. The cumulative effect of each of these transformations is quite significant. By doing them in small steps you reduce the risk of introducing errors. You also avoid having the system broken while you are carrying out the restructuring — which allows you to gradually refactor a system over an extended period of time.

I also want to talk about documentation in this blog post. For a programmer reliable documentation is always needed. The presence of documentation helps keep track of all aspects of an application and it improves on the quality of a software product. Its main focuses are maintenance, development, and knowledge transfer to other programmers. Successful documentation will make information easily accessible, simplify the product, help new users learn quickly, provide a limited number of user entry points and help cut support costs. Documentation is usually focused on the following components that make up an application: business rules, troubleshooting, server environments, application installation, database/files and code deployment.

A software framework is a concrete platform where common code with general functionality can be specialized or overridden by developers or users. Frameworks take the form of libraries, where a well-defined API is reusable anywhere within the software under development. There exist some features that make a framework different form other library form. These features are: default behavior, inversion of control, extensibility, non-modifiable framework code.

I am attaching the following links that will help you have a better understanding of these concepts as these blog posts also provide examples.
https://refactoring.com/
https://medium.freecodecamp.org/why-documentation-matters-and-why-you-should-include-it-in-your-code-41ef62dd5c2f
https://www.quora.com/What-is-a-framework-in-programming

Advertisement

Static vs Dynamic testing

Hello dear reader! It’s me again with some more types of testing that I think it will be very useful for you to know.

Both Static and Dynamic Testing are two other types of testing very important for testers and developers as they are part of the Software Development Life cycle. The decision for which of these two tests to use would come from the company you will be working for. However, it is very important for you to know what they are and where to use them as you might be asked to give your opinion and you don’t want to give a wrong answer!!!

Dynamic Testing is performed when the code is in the operation mode, in run time environment. When a value is inputted to the code, the output of the code is checked and compared with the different expected output. Dynamic testing is also known as a validation testing, evaluating and finished product. With this we can observe the functional behavior of the software, CPU response time, performance of the system and monitor the system memory.
Dynamic Testing has a few techniques like: Unit Testing – Integration Testing – System Testing – Acceptance Testing (please see the previous blog for a better explanation of these techniques).

Static Testing is the type of testing where the code is not executed. This type of testing can be performed by tools or manually. This type of testing checks the code, requirement documents and design document and puts under review comments on the work of the document. Static Testing it is usually called verification testing as it is started earlier in the development life cycle. This type of testing can be done on work documents, design documents, source code, test scripts, web page, test cases and test plans.
Just like the Dynamic Testing, Static Testing has also its technique: Inspection – Walkthrough – Technical Reviews – Informal reviews (there will be another separate blog to discuss about these techniques).

But what are some of the differences between these two types of testing?

As mentioned above Static Testing is a performed in an early stage of development, before deployment while the Dynamic testing is performed at the later stage of development life cycle, after deployment. While the Static Testing doesn’t use the execution of the code, executing the code in the Dynamic Testing is a must. Also another difference would be that Static Testing has more statement coverage  than dynamic testing in shorter time.

In general I choose to write about all types of testing as I think it is very important to be aware of them. Different situations, different projects, different code, different stage requires different type of testing. Knowing which way to test is just as important as knowing how to write code for a software.