Latest Post

In computer science, software documentation is the procedure of writing, designing, and documenting an application. In software engineering, this refers to the formal specification of a software product or component.

Software documentation should serve as an instructional manual for users and developers alike. It also refers to the textual, visual, or audio instructions accompanying computer software. It also enables the end-user or developer to understand and use a system software or application software. Generally, software documentation provides instructions on how to utilize a program or service.

Software Documentation 101

When it comes to software documentation, it can be said that the best practices exist along with a range of different factors like the following:

  • Technical and non-technical parts of the documentation
  • Best practices apply to specific programming languages
  • Based on the organization’s experience working with a specific technology

4 Best Practices For Software Documentation

A formalized process may be considered an effective way of dealing with these factors. Therefore, here are some of the best practices you can adapt for software documentation:

1. Involve A Team Of Subject Matter Expert

First, the best practices for software documentation usually involve a team of subject matter experts interacting with a formal writing process. You might call this the ‘bug fight.’  In this case, the system administrators have defined a list of the most critical defects they want to be fixed.

One example of a formal documentation process can be a technical book. In many cases, the technical content is written by the authors themselves or by people who have a very good understanding of the subject matter rather than by a committee of some kind.

A technical book might have chapter-by-chapter illustrations, side tables, diagrams, and charts. Such a book would be best documented in a format that’s consistent with the rest of the book (in terms of formatting, graphics, etc.) rather than being set up as a series of single-page screenshots. The technical writer can use online fax to secure the software documentation and send it to the team working on it.

2. Follow A Process Outline In A Master Document

The documentation has to follow a process that’s been outlined in a master document, which is formally accepted as the final product of a group of subject matter experts working together in a coordinated fashion. The document must contain specifications and descriptions of the product’s essential features as well as a list of all the product’s critical defects.

It doesn’t need to be put together by a committee as it can be done by the actual technical writer. Such a writer has much more expertise in producing high-quality technical content and is better positioned to establish appropriate guidelines for content management.

3. Formalize The Software Documentation

There are two significant advantages to formalize documentation. First, it prevents errors from being committed during software development. Second, it makes it easier for people to work together in improving the software. Given both of these advantages, formalizing software development processes helps reduce the likelihood of problems being left behind when the software is released.

In short, having an official document detailing every aspect of a software’s design and implementation helps ensure the software will meet its intended users’ needs and requirements. Such documents also make it easier for software developers and other people to come together to deal with technical issues as they arise.

4. Stick To The Guidelines

In terms of technical content development, it’s best to stick to guidelines rather than dictate everything from scratch. As long as there’s some level of common ground existing between the parties involved, the resulting documentation will be likely acceptable.

There are a few approaches that can be taken in terms of documentation quality and technical content development. One approach is the search for common ground or a ‘base’ document, and it can be modified to meet the unique requirements of each case. This approach has the advantage of making the documentation more generic and more reusable. Also, it helps ensure a higher degree of uniformity in the final product as the same technical content will generally be present regardless of the audience.

Conclusion

The importance of knowing the best practices in writing software documentation doesn’t only apply to developers and testers but also users themselves. When using a piece of software, a customer should understand all of the information that’s present in the software documentation and have confidence in the functioning of the application.

For this reason, it’s crucial for software developers, engineers, and subject matter experts to come up with clear and concise pieces of information so users can understand the purpose of their software and why it’s created in the first place.

The post 4 Best Practices For Software Documentation appeared first on The Crazy Programmer.



from The Crazy Programmer https://ift.tt/3x3jgkE

Software testing suites and end-to-end testing are critical in software building. These tests make sure that your software runs smoothly by finding problems ahead of time. To do this, testing tools mimic the way a potential user will use the software.

And Python is a fantastic programming language to build such testing tools. Python is one of the most popular programming languages out there, and for a good reason.

Python, an open-source language released in 1991, is both a simple and powerful language. Its simplicity makes it easy to learn and read, something that’s helpful for beginners. But just because it values simplicity and readability doesn’t mean it can’t scale.

As an object-oriented programming language, Python is also robust, and you’ll find it exceptional for building an E2E software testing tool.

What Is E2E Testing?

E2E Software Testing

Image Source

Even though end-to-end testing can get complex, in concept, it is straightforward. In simple terms, it is a type of software that tests other software. E2E testing runs through a program (from the beginning to the end) to ensure that the code is running properly.

In software development, end-to-end testing is a crucial step. Without it, you cannot be sure that the software will work under real-life circumstances. This is especially true as software becomes more and more complex.

Modern software is elaborate and has layers and layers of components. Networks, user interfaces, third-party integrations, and other subsystems have to work in harmony. Any one of these blocks can fail, resulting in an unstable program.

But even if specific blocks of code work in isolation, there is no guarantee that the entire application will work. Because with complexity comes unexpected bugs. So E2E testing explores the entire program as a whole, from start to finish, to find bugs ahead of release.

Automated Testing

This testing can be run both manually and automatically. If manual, someone simply uses the program and finds problems along the way. But this is a time-consuming and laborious process.

Automatic testing, however, is significantly more efficient. While expensive and challenging for a smaller company to implement, it is a critical step for large software companies. Automated testing repeats predefined actions over and over to ensure that the software’s components—the network, the server, the hardware, the UI, etc.—are all compatible.

And as software is updated, so too must the E2E testing tools working alongside it. Even though it is time-consuming, keeping your E2E testing up to date means that it won’t miss bugs.

What is Python?

Many programming languages, such as C++, are not all that approachable. The syntax and structure are specific and complex, making it strenuous to learn. But Python is a minimalist programming language, and it’s fantastic for beginners.

Python is a backend programming language that is simple and approachable—the syntax is similar to English. It is also a high-level language, which means that you don’t have to worry about low-level details such as memory management.

And despite Python’s straightforward and readable code, it is also powerful and scalable. Python is particularly exceptional with automated tasks, a feature you want in software testing.

Dutch programmer Guido van Rossum began working on Python in the late 1980s and released it in 1991. Since the original release, it has undergone many updates and acquired lots of new features. But it has held onto its core approach of simplicity and approachability.

One of the core philosophies of Python is that it should be easy and fun to use. In fact, the name Python is said to be a reference to the British comedy Monty Python.

Why Use Python?

Despite its simplicity, clarity, and ease of use, Python is also powerful. The language is optimized for object-oriented programming, but it is also functional. This means that a programmer can decide whether functions or classes will work better.

And Python also has a deep library of packages for testing. These are pre-made and customizable automation scripts that make it pain-free to build your software testing tool.

If you are a beginner, you can also count on a large and welcoming community worldwide. Aside from the well-maintained and friendly community, Python tutorials are widely accessible across the internet. The variety of these tutorials is endless; everything from writing your own Monte Carlo simulation to building web extraction tools in Python.

Why Testing Tools Fail

Even though E2E testing is supposed to catch bugs, a test suite in software testing is clunky and can too easily fail. When the testing software doesn’t evolve with the application, it will miss more and more bugs.

This is because as an application is updated, users will take different pathways through it. And when the testing suite doesn’t account for this, bugs will slip through.

Building an E2E Software Testing Tool

Python is great because you can build a simple testing tool with just a few steps. And with Python, a straightforward tool can always evolve with you. More complexity can be added on top of the simple foundation.

One way of testing an application is to do it manually, but if you’re building a tool, then you want to automate the testing process. In Python, automation modules can be called that allow for exploratory testing.

And Python uses duck typing, which means you don’t have to worry about the class of an object before using it. This is especially useful for automation, where you don’t have to be fussy about classes/types.

Integration and Unit Testing

An integration test takes a particular input and makes sure the output is correct. It is a pathway through the program that involves multiple components that all have to work properly.

The problem with integration testing is that if you get a test.fail situation, it is hard to pin down the issue. Depending on how many parts there are to your program—classes, functions, and modules—any one of them could be the problem.

Integration testing is efficient, but diagnosing failures can be a headache.

Unit testing, on the other hand, zooms in on a specific component. It takes more time, but when there is a bug, it is obvious which component has failed.

Conclusion

If you want your application to run smoothly, end-to-end testing tools are critical. And Python is simple and easy to learn.

And with its rich library of automation scripts, Python is a great choice for building your software testing tool.

Author Bio:

Erik Fogg

Erik is the MIT-educated COO and Co-Founder of ProdPerfect. He loves unleashing the potential of the great folks in the world and loves helping make decisions with facts. A couple years ago he co-founded ProdPerfect, where he helps his team grow personally and improve their ability to help people solve QA problems. He also helps customers use actual live data–instead of educated guesses–when deciding what tests to write and maintain. In his spare time he podcasts and writes books about making fact-based decisions in business and politics.

The post Building an E2E Software Testing Tool in Python appeared first on The Crazy Programmer.



from The Crazy Programmer https://ift.tt/3h48jZa

In this article, we will study about arguments and parameters used in the programs at the time of function call.

Sometimes, along with function names, some variables or values are also used and passed to them which help in the execution of a program. These variables which provide extra information about the function are called arguments. The arguments used in one function cannot be used in other functions as they are specific to a particular function and are used only in that specific function. These arguments are passed to the functions at the time of the function call. We can add many arguments to the function and make it more informative.

While Parameter is a type of identifier which is used to identify the type of values passed to a function. In other words, they define the data type of an argument and assign it a general variable that is used while defining a function. They do not contain specific values and are used while writing functions in larger programs to divide them into more readable blocks of code. We can pass several parameters to a function and each parameter is separated by a comma.

Although the terms parameter and arguments are used interchangeably, they differ slightly in their definition and functions. The values passed to the unction at the time of function calling are known as arguments and the values passed at the time of defining function are called parameters. This method of passing values is also known as “Pass by value”.

Let us understand the difference between argument and parameter with the help of a program.

int add (int a, int b)                   // Line 1 
{ 
    int sum ; 
    sum = a + b ; 
    return sum ; 
} 
int main() 
{ 
    int ans; 
    ans = addition (5 , 3) ;             //Line 10 
    cout << " The sum is " << and ; 
}

The above C++ program is used to find the sum of two integers – a and b. It can be observed that, at Line 10, the values passed to the function addition, i.e, 5 and 3 are arguments and at Line 1, the values passed to the function, i.e, ‘a’ and ‘b’ are called parameters. We conclude that the actual values are called arguments and their prototype are called parameters and these have found extensive use in providing information about the programs.

Arguments vs Parameters

Argument Parameter
It is passed to the function at the time of the function call. It is passed to the function at the time of specifying function definition.
These are the actual values used to execute the function. These are variables used in place of actual values to generalize the function.
Also called actual parameters. Also called formal parameters.

So, this is all about parameters and arguments in programming. Comment down below if you have any queries.

The post Arguments vs Parameters in Programming appeared first on The Crazy Programmer.



from The Crazy Programmer https://ift.tt/3h9mCM0

In this article, we will take a look at one of the most dynamic varieties of computers, the hybrid computers.

Hybrid computers are those computers that have the functionalities of both analog and digital computers. Analog computers are those which work on continuous numerical data & logical operations while digital computers are those which work on both numerical & non-numerical data and deal with complex mathematical calculations. A hybrid computer uses both the qualities of analog as well as digital computers and hence increases accuracy and speeds up the processing.

Hybrid Computer - Definition, Types, Examples, Advantages

The analog computers are very fast in performing complex mathematical calculations but are not accurate while processing the information. Digital computers take care of the precision of the values but are really slow while performing the calculations. The qualities of both these computers were combined in a single computer, known as a hybrid computer, to achieve the goal of fast and accurate processing at the same time.

The first hybrid computer was designed in 1961, by Packard Bell, and it was named HYCOMP 250.

Types

1. Large Electronic Hybrid Computers: These computers are capable of solving complex mathematical equations.

2. General Purpose Hybrid Computers: These computers help to solve different issues along with performing many tasks simultaneously.

3. Special-Purpose Hybrid Computers: These computers are used to solve specific types of problems.

Advantages

1. Provides functionalities of both analog and digital computers.

2. Returns accurate results at a fast pace.

3. Helps to solve complex mathematical equations efficiently.

Real-life Applications

1. Used in different medical equipments like CT scan, Ultrasound machine, Electrocardiogram, and Echocardiogram.

2. Used in hospitals – in ICUs.

3. Used to measure heartbeats.

4. Used at petrol pumps.

5. Scientific calculations.

6. In cell phones to convert signals.

This is all about hybrid computers. These computers have found great use in large organizations for performing complex calculations and producing accurate data.

The post Hybrid Computer – Definition, Types, Examples, Advantages appeared first on The Crazy Programmer.



from The Crazy Programmer https://ift.tt/3jdmmyg

All parents know that the jobs of tomorrow will rely on STEM skills and programming knowledge and that it’s necessary to get ready for this today. But if you don’t have these skills yourself, how can someone recognize the best coding instructors from the rest?

It’s crucial to find an online coding camp for kids today that imparts programming fundamentals. Let’s check out more about how they work and what you can expect to find.

Kids Need to Learn Coding Fundamentals from the Start

Goals Like Video Games

There’s hardly anything kids love more than video games, and framing lessons around something they love so much is a perfect motivator for learning. The best coding programs for children teach them how to build their own video games that they can play afterward and show their friends.

In a way, building a video game can feel like playing a video game. Kids will have so much fun doing it that they won’t even realize they’re learning.

Professional Coding Languages

Some courses teach novices programs like Scratch, a drag-and-drop language designed to give beginners a sense of how coding works. The problem is, nobody uses these languages in the classroom or in the workplace.

Kids as young as seven can and should learn coding languages that professionals use to build programs, apps and games used by millions of people. The best coding programs teach:

  • Python
  • Java
  • C#
  • C++
  • Unity

Get your kid learning the languages that they’ll need in the field right from the start. By absorbing such language early on, they’ll absorb all the mental habits needed to become fluent in coding languages.

Small Classrooms

In-person classrooms are best when there is a low student-teacher ratio, and this doesn’t change when lessons move online. Ideally, there should be four students per teacher, so your child can get all the attention they’ll need.

It’s difficult for anybody to absorb new topics, especially if they’re complex. Even young kids can learn to code, but they need ample attention from their instructors.

Young, Fun, Qualified Instructors

Finally, it’s crucial to find a program that hires teachers who are experienced coders young enough to have also grown up playing video games themselves. When students learn from a passionate teacher, not only will they retain more of the material, but they’ll become more enthusiastic and energized about coding.

Undergrad students with Computer Engineering or Computer Science backgrounds make the perfect instructors, especially if they’ve taught the subject for a while. The best programs select teachers personally. It’s better for your child to have a younger teacher with a lot of energy and knowledge than the world’s most sophisticated programmer who can’t relate to children.

No parent wants to prepare their kid for the workforce at the expense of undermining their sense of childhood innocence and play. By enrolling them in coding lessons with the right focus, structure, and teaching environment, children will develop the coding fundamentals to be ready for the jobs of tomorrow and will have a great time learning them.

The post Kids Need to Learn Coding Fundamentals from the Start appeared first on The Crazy Programmer.



from The Crazy Programmer https://ift.tt/2S1B3JI

In this article, we will study two popular terms in the programming language Expression vs Statement and take a look at the differences between the two.

In the programming world, an Expression is a function or a combination of characters, variables, and operators combined together to produce a certain value. These expressions are interpreted by the programming language and converted to produce a value through the process of evaluation. The value obtained is of a primitive type which includes integer, float, boolean, string, or other data types.

For example:

value = a + b/5

Types of Expressions

1. Integral Expressions: As the name suggests, these kinds of expressions return an integer value. Even if a floating value is used in the expression, it is converted into an integer explicitly by the user.

For example:

value = (int)5.0 – b*a

2. Floating Expressions: These kinds of expressions return a floating value. Even if an integral value is used in the expression, it is converted into a floating one explicitly by the user.

For example:

value = (float)5 – b*a

3. Constant Expressions: Constant expressions consist of only constant values which do not change.

For example:

3/6 + 8*3

4. Logical Expressions: These expressions use logical operators (&& and || ) to compute the value of two or more arithmetic expressions.

For example:

a && b || a==b

5. Relational Expressions: These types of expressions return boolean values. Such expressions use relational operators ( <, >, ==, =<, >= ) to compare arithmetic values on either sides of an expression and return a boolean value.

For example:

a + b >= 6

6. Pointer Expressions: Pointers are values that are used to store addresses. Pointer expressions return address values using pointer notations.

For example:

&a , pointer++

7. Bitwise Expressions: These expressions use bitwise operators (<< and >>) to return a value by shifting the bits to the left or right position.

For example:

b << 7 (Shifts left by 7 bits)

These expressions are a part of a broader unit called ‘Statements’. Statements are the combination of characters or words which are used to print the output on the screen. The expressions return a value and these values are printed with the help of statements.

Types of Statements

1. Assignment Statements: These statements are used to assign values to variables.

For example:

value = 1000

2. Increment/Decrement Statements: These statements are used to increment and decrement the value of a variable respectively.

For example:

value++

3. Method call/ Print Statements: These statements are used to call the methods and print them using the print statements.

For example:

System.out.println(value)                     // Statement to print output in Java Language

4. Object Creation Statements: These statements are used to initialize variables or creating objects.

For example:

Integer object = new Integer()                // Statement to create object in Java Language

5. Declaration Statements: These statements are used to declare variables in our programs.

For example:

float value = 785.65

Expression vs Statement

Expression Statement
Expression is a function or a combination of characters, variables, and operators combined together to produce a certain value. The values returned by expressions are printed using statements.
There are 7 types of expressions. There are 5 types of statements.
It uses arithmetic operators and variables to perform its function. It uses simple English statements to perform its function.

Expressions and statements are an important part of any program and most of the codes mainly use them to produce the results. That is why they are much popular among coding languages.

The post Expression vs Statement in Programming appeared first on The Crazy Programmer.



from The Crazy Programmer https://ift.tt/3xnEKIv

In this article, we will look into an interesting problem asked in many coding interviews related to arrays: Dutch National Flag Problem. We will discuss the problem, the intuition behind it, and the application of the algorithm in certain scenarios. Along with this we will look at different approaches to solve the problem and analyze its complexities.

Dutch National Flag Problem is among the popular programming problems suggested by E. Dijkstra. So, from the name, it is clear that the problem is related to the Dutch or National Flag of the Netherlands. The flag of the Netherlands has three colors: Red, White and Blue in the same order. So the problem is if given a set of balls belonging to these colors we have to randomly arrange balls of red, white and blue such that balls of the same color are placed together and the order is maintained. In programming, we represent this problem as : Given an Array of 0’s, 1’s and 2’s we have to arrange them such that 0’s come before 1’s and 1’s come before 2’s. So we have to sort this array and arrange them in the order similar to Dutch National Flag.

Let us understand this with an example. Consider this array:

Also, consider the 0’s, 1’s and 2’s representing the colors Red, White and Blue of the flag. We have to sort this Array to look like this:

Now, let us discuss the Dutch National Flag Algorithm to do this but first also have a look at the other approaches before getting into the algorithm to get the idea of its necessity.

  • Naïve Approach: The naïve approach will be to count the number of 0’s,1’s and 2’s in the array at first. Then we have filled the array serially with the occurrences of each number. This will require exactly 2 traversals of the array so we need to think of an approach requiring only 1 traversal.

Dutch National Flag Algorithm

Basically, the main idea of this algorithm is to move the 0’s to extreme left and 2’s to the right of the array respectively. Doing this, the 1’s automatically end up in the middle of the array. Thus, sorting the array at the end. The algorithm mainly consists of these steps:

  • We maintain three pointers Low, Mid and High. At first we set, Low and Mid at start index (0) of the array respectively and the High pointer at end index (Size – 1) of the array.
  • Then, we start iterating the array we take decisions based on Value at index Mid for each Arr[Mid] there are 3 cases.
      1. If Arr[Mid] = 0 : Then we Swap values at Arr[Low] with Arr[Mid] and increment both Low and Mid pointers.
      2. If Arr[Mid] = 1: Then we do nothing and just increment mid by 1. This ensures that all 1’s are in the middle..
      3. Or, If Arr[Mid] = 2: We Swap values at Arr[Mid] with Arr[High], then decrement the High Pointer to replace the value at high with value at mid.
  • We repeat these steps considering the given conditions until Mid <= High.

Note: This Algorithm is only useful in sorting Arrays where Three-Way Partitioning can be applied.

Implementation in Java

public class DutchNationalFlag_Sample
{
  // Swap values for case 0 and 2.
  static void swap(int arr[],int i,int j)
  {
      int temp = arr[i];
      arr[i] = arr[j];
      arr[j] = temp;
  }
    
  static void sortArray(int arr[],int n)
  {
     int mid = 0;
     int low = 0,high = n-1;
     
     while(mid <= high)
     {
         switch(arr[mid])
         {
            case 0: swap(arr,low,mid);
                    low++;                       // we increment low and mid when we get 0
                    mid++;
                    break;
                    
            case 1: mid++;                       // we increment only mid to keep 1's in the middle.
                    break;
                    
            case 2: swap(arr,mid,high); 
                    high--;                      //we decrement high as we moved 2 to last index or high.
                    break;
         }
     }
  }
    
  static void printArray(int arr[],int n)
  {
      for(int i=0;i<n;i++)
      {
          System.out.print(arr[i]+" ");
      }
      System.out.println();
  }
      
  public static void main(String args[]) 
  {
    int arr[] = { 0, 1, 2, 1, 0, 2, 1, 2, 0 }; 
        int n = arr.length; 
    
    System.out.print("Array Before Sorting: "); 
        printArray(arr,n);   
        
        //Calling sort function.
        sortArray(arr,n);
        
        System.out.print("Array After Sorting: "); 
        printArray(arr,n);   
        
  }
}

Output:

Array Before Sorting: 0 1 2 1 0 2 1 2 0 
Array After Sorting: 0 0 0 1 1 1 2 2 2

Time Complexity: We do a single traversal of the array, so the complexity will be O(n) moreover we do this in only one traversal.

Application

The Dutch National Flag Algorithm can be used in implementing Quicksort efficiently for inputs with majorly repeated elements. Quicksort exhibits its worst-case performance in such inputs taking O(n2) time. The Dutch National Flag Algorithm with its 3-Way Partitioning method can help resolve the partition routine separating the values into three groups:

  • The values less than the pivot,
  • The values equal to the pivot,
  • And, the values are greater than the pivot.

The values equal to the pivot are already sorted, so only the value less than or greater than the pivot needs to be recursively sorted. This linear-time partition routine is similar to 3–way partitioning for the Dutch national flag problem. This will make Quicksort work efficiently in O(n) time for inputs having identical values.

Let us have a quick look at the Pseudocode for the Partition routine using DNF Algorithm.

partition(arr[],start,end)
{
 mid = start;
 pivot = arr[end];
 while (mid <= end)
 {
 if (arr[mid] < pivot)
 {
 swap(arr[start], arr[mid]);
 ++start, ++mid;
 }
 else if (arr[mid] > pivot)
 {
 swap(arr[mid], arr[end]);
 --end;
 }
 else 
 {
 ++mid;
 }
 }
 // mid contains the position of partition.
 return mid;
}

So, That’s it for the article you can try out the code with different examples and execute them for a clear idea. Feel free to leave your doubts/suggestions in the comment section below.

The post Dutch National Flag Problem appeared first on The Crazy Programmer.



from The Crazy Programmer https://ift.tt/3fxTP4b

In this article, we will take a look at the advantages and disadvantages of one of the most basic data structures in programming – Arrays. But before that, let us have a brief understanding of what arrays are.

An array is one of the most popular data structures in various programming languages like C, C++, Java, etc. It is used to store data in contiguous memory locations. Whenever we deal with an ordered set of data, arrays are the first and foremost choice to store this data. It can be used to store data of different data types like integer, float, char, double, etc, but a single array contains data of only a single data type. The values stored in arrays are identified by their indexes which generally starts from zero, i.e, the first element of an array will have index zero, the second element will have index one, and so on. These arrays are of great use while executing lengthy programs, but they have certain advantages and disadvantages too.

Array-representation

In the above representation, note that the next location is incremented by 4 and not by 1. This is because an integer takes 4 bytes of memory, therefore the memory location gets increased by 4. If you take any other data type, the memory address will vary accordingly.

Advantages of Array

  • Arrays help in code optimization. We can store a large number of values in a single array by writing a small piece of code rather than declaring each variable separately.
  • Arrays are easy to use as many algorithms like searching and sorting techniques, finding maximum and minimum values, reversing can be easily implemented using arrays.
  • The time complexity to access any element of an array is O(1), i.e, it takes a constant amount of time to access an element.
  • Arrays use indexes to identify their elements. These indexes starting from ‘zero’ and ending at ‘length of array – 1’ can be used to access all elements of an array.
  • Along with simple arrays, we also have 2- dimensional arrays, which are used to store elements of a matrix of any dimensions.
  • Since arrays store elements in contiguous memory locations, no extra memory is allocated outside this contiguous block, which prevents wastage of memory.
  • Being one of the most basic data structures, arrays can be used to implement other data structures like linked lists, stacks, queues, graphs, trees, etc.
  • Arrays can be used to implement many CPU Scheduling techniques.

Disadvantages of Array

  • The size of an array is fixed. Once the memory is allocated to an array, it cannot be increased or decreased. This prevents us from storing extra data in case we want to. These arrays of fixed size are called static arrays.
  • Allocating less memory than the required to an array leads to loss of data.
  • A single array cannot store values of different data types, i.e, an array is homogenous in nature.
  • The deletion and insertion operations in arrays are very difficult to implement as they store data in contiguous memory locations. To overcome this problem, linked lists are implemented which provide random access of elements.
  • In C language, the compiler does not perform index bound checking on arrays. So, if we try to access an element using an index that is outside the range of indexes of an array, the compiler shows a run time error, rather than an index out of bounds error.

Despite many of its disadvantages, arrays are largely used in big projects because of their vast number of advantages. So, this is all about the advantages and disadvantages of arrays.

The post Advantages and Disadvantages of Array appeared first on The Crazy Programmer.



from The Crazy Programmer https://ift.tt/3yQJXdJ

In this article, we will take a look at the two components of computer networking – Workgroup and Domain.

A domain is a collection of computers where one computer acts as a server and all others are connected to it on the same or different network. Domain networks ensure the security of data and allow encrypted sharing of information between devices.

A workgroup is a collection of computer networks where each computer is independent of other computers in its group in reference to their working and functionality. We need a unique login credential to access each computer in a workgroup. They are not much secure and are connected locally on a single network.

Domain networks are used by organizations and companies at the workplace while workgroups are used by individuals for personal use, like at homes. A domain acts as a client-server interface where the user can log in from any device under the domain, using his login credentials. While, in a workgroup domain, only a single user has access to the device. No other login credentials would work on that particular system.

Workgroup vs Domain

Workgroup Domain
The configuration and installation of the workgroup are easy. The configuration and installation of the domain are difficult.
It is hard to maintain a workgroup. It is easy to maintain a domain.
Remote login is not possible in a workgroup. It is a remote-login-based system.
A workgroup is based on a peer-to-peer network. A domain is based on a client-server network.
Each computer in a workgroup is maintained independently by a single user. All computers in a domain are governed and controlled by a centralized server.
Each device in a workgroup has its own local database. All devices in a domain have a single centralized database.
It has a unique login credential for each device. All the devices in a domain can be accessed by a single login credential.
The workgroup names of the devices are autonomous in nature. The names of devices under the domain are provided on basis of IP address.
A workgroup is formed by devices of a single local network. A domain can be formed by devices of one or more different networks.
A workgroup is less secure as compared to the domain. A domain is more secure as compared to the workgroup.
Data recovery is not possible in a workgroup as data is maintained locally on each device. Data recovery is possible in a domain as it has a centralized system of maintenance.
It is used to share personal data between devices. It is mainly used to share sensitive and confidential data between devices.
Only a small number of devices can be used to form a workgroup. A domain is formed by connected a large number of devices.
It is used by small local area networks like at homes, in schools, large buildings, etc. It is used globally by large multinational companies and organizations to manage information.

This is all about the domain and workgroup servers in our computer networks.

The post Workgroup vs Domain appeared first on The Crazy Programmer.



from The Crazy Programmer https://ift.tt/2Ss6uMS

In this article, we will study the two types of addresses in the operating system – Physical and Logical addresses and take a look at the differences between the two of them.

How do we define an address? In layman language, an address is used to uniquely identify a location in the computer memory. The two types of addresses also bear the same qualities and store addresses in a slightly different manner which we will study subsequently.

There are two main components of a computer system – the Control Unit (CU) and the Memory Unit (MU). CU is responsible for input and output operations while MU is responsible for processing and storing instructions and data.

The logical address is generated by the CPU and the physical address is generated by MU. The physical address is the real location in the memory unit which is virtual to the user, i.e., the user cannot view the physical address. But the logical address is generated in the perspective of the execution of a program and is visible to the user. A logical address has no physical existence and so it also called a virtual address.

The logical and physical addresses are generated through mapping.

The following figure shows how the addresses are generated in our computer system:

Address-mapping

The Central Processing Unit generates the logical address during program execution. The logical address passes through the Memory Management Unit (MMU) which translates the logical address into a physical address in two steps. First, it generates a relocation register ( a hardware component consisting of a constant which is added to the memory address). After this, the constant is added to the logical address to get the physical address which is stored in the memory unit. The need to perform mapping of address in MMU is that although the program can run in the logical address, it requires a physical address for its execution. And this physical address can be accessed indirectly with the help of a logical address after mapping.

Difference between Physical and Logical Address

Logical Address Physical Address
It is generated by the CPU. It is a location in a memory unit.
The set of all logical addresses is called Logical Address Space. The set of all physical addresses corresponding to the logical addresses is called Physical Address Space.
It can be viewed by the user. It is not visible to the user.
A logical address can be used to access physical addresses. A physical address cannot be used to access logical addresses.
It is also called a virtual address. It is also called a real address.

Comment down below if you have any queries related to physical and logical address in os.

The post Difference between Physical and Logical Address in Operating System appeared first on The Crazy Programmer.



from The Crazy Programmer https://ift.tt/3wDHn8Z

In this article, we will have a look at the two network configurations in computer networks – ipconfig and ifconfig. Before diving into the details, let us have a brief understanding of what is configuration and why is it necessary.

Network configuration is the process of assigning and arranging the network controls in a manner to perform specific tasks. Network configurations can be done either physically by using physical devices or virtually, by using the software. The virtual mode is easier to implement since it reduces the load of handling configurations manually.

To check these network configurations and make changes in these configurations, we use ifconfig and ipconfig commands. Ipconfig and ifconfig help us to enable, disable and manage network configurations by using certain commands in the terminal, also called the CMD or the command-line interface in our computers. There are many more commands under these two commands which help us to manage configurations of different devices.

What is ipconfig?

Ipconfig stands for Internet Protocol configuration. It is a command which enables us to view all the current TCP/IP configurations of our system. TCP/IP configurations are those which help us to establish communication between the application software and the computer networks and also ensure successful delivery of data packets from one place to another. Each data packet has a unique IP address which enables us to communicate and establish connections with the devices. Microsoft Windows operating system supports this configuration command. Other operating systems like React OS, Apple Mac OS, and some versions of Linux OS also support this command.

What is ifconfig?

Ifconfig stands for Interface configuration. This command is also used to view, change and manage all the current configurations of the computer network. This command is mainly used in Unix-based operating systems.

ipconfig vs ifconfig

                            Ipconfig Ifconfig
It stands for Internet Protocol configuration. It stands for Interface configuration.
This command is mainly used in Microsoft Windows operating systems. This command is mainly used in UNIX-based operating systems.
It shows the network configurations of all the active as well as non-active devices connected to the system. It shows the network configurations of only currently enabled interfaces connected to the system.
In a Microsoft Windows operating system, the “ipconfig/all” command is used to display all the network configurations on the system. In a Unix-based operating system, the “ifconfig-a” command is used to display all the network configurations on the system.

The below image shows the use of ipconfig command in Windows 7 OS. Observe that if you use ifconfig command in Windows, it will show an error. The same is depicted in the image below.

ipconfig

The below image shows the use of ifconfig command in Ubuntu 20.04 OS. Observe that if you use ipconfig command in Linux, it will show an error. The same is depicted in the image below. Note that if the ‘ifconfig’ command doesn’t work, then enable the command by using < sudo apt install net-tools > command in the terminal.

ifconfig

This is all about the two network configurations of our computer networks.

The post ipconfig vs ifconfig – Difference between ipconfig and ifconfig appeared first on The Crazy Programmer.



from The Crazy Programmer https://ift.tt/3yDNk7t

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget