ITBots.in
ITBots.in
  • Home
  • About
  • Jobs
  • Events
  • Courses
  • Exams
  • Blog
  • Recruiter
  • Pricing
Sign In
Applicant Recruiter/Advertiser

Categories

  • Artificial Intelligence (AI) (4)
  • Career Space (30)
  • Cheatsheets (0)
  • Cybersecurity (3)
  • Data Science (0)
  • DevOps (0)
  • Gaming (1)
  • Guest Authors (0)
  • Interview Questions (22)
  • Interviews (3)
  • IT News (2)
  • Others (14)
  • Project Management (0)
  • Scholarships and Fellowships (92)
  • Software Development and Programming (10)
  • Students Corner (4)
  • Testing (0)
  • Videos (0)
  • All(166)

IT Blog

Publish with us

Filter Clear
Networking Basic Interview Questions
May 13, 2024
Networking Basic Interview Questions

1. What is a computer network? A computer network is a collection of interconnected devices (such as computers, servers, printers, etc.) that can communicate and share resources with each other. 2. What are the different types of networks? Networks can be classified into several types, including LAN (Local Area Network), WAN (Wide Area Network), MAN (Metropolitan Area Network), WLAN (Wireless Local Area Network), PAN (Personal Area Network), and more. 3. What is the OSI model, and how many layers does it have? The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven abstraction layers. 4.Explain the layers of the OSI model. The layers of the OSI model, from bottom to top, are: Physical, Data Link, Network, Transport, Session, Presentation, and Application. 5.What is the TCP/IP model? The TCP/IP (Transmission Control Protocol/Internet Protocol) model is a networking protocol suite that defines a set of rules used to enable communication between devices over the Internet. 6.Compare the OSI and TCP/IP models.  The OSI model has seven layers, while the TCP/IP model has four layers (Application, Transport, Internet, and Link). The layers in both models serve similar functions but are organized differently.  7. What is a protocol?  A protocol is a set of rules governing the exchange of data between devices. It defines how data is formatted, transmitted, received, and interpreted. 8.What is TCP/IP?  TCP/IP is a suite of protocols that enables communication between devices over a network. It includes protocols such as TCP, IP, UDP, ICMP, and others. 9.  What is UDP? UDP (User Datagram Protocol) is a connectionless protocol used for sending datagrams over a network. It provides minimal overhead and is commonly used for real-time applications where speed is more important than reliability. 10. What is an IP address?  An IP address is a unique numerical identifier assigned to each device connected to a network. It is used to identify and locate devices on a network. 11. What is a subnet mask?  A subnet mask is a 32-bit number used to divide an IP address into network and host portions. It helps determine which part of an IP address belongs to the network and which part belongs to the host. 12. What is a default gateway? A default gateway is a device (usually a router) that connects devices on a local network to devices on other networks. It serves as the exit point for traffic destined for destinations outside the local network. 13. What is a MAC address?  A MAC (Media Access Control) address is a unique identifier assigned to each network interface card (NIC) or network adapter. It is used to identify devices on a local network. 14.  What is DNS?  DNS (Domain Name System) is a decentralized naming system for computers, services, or other resources connected to the Internet or a private network. It translates domain names into IP addresses. 15. What is DHCP? DHCP (Dynamic Host Configuration Protocol) is a network management protocol used to automatically assign IP addresses and other network configuration parameters to devices on a network. 16. Explain the difference between a hub and a switch.  A hub operates at the physical layer of the OSI model and simply forwards incoming data packets to all connected devices. A switch operates at the data link layer and intelligently forwards data packets only to the intended recipient. 17. What is a router? A router is a networking device that forwards data packets between computer networks. It operates at the network layer of the OSI model and uses routing tables to determine the best path for forwarding packets. 18.  What is a firewall? A firewall is a network security device that monitors and controls incoming and outgoing network traffic based on predetermined security rules. It acts as a barrier between a trusted internal network and untrusted external networks. 19. What is NAT? NAT (Network Address Translation) is a technique used to modify network address information in packet headers while in transit across a routing device. It allows multiple devices on a local network to share a single public IP address.  20. What is VLAN?  A VLAN (Virtual Local Area Network) is a logical network segment created within a larger physical network. It enables devices to communicate as if they were on the same physical network, even if they are physically located on different network segments. 21. What is ARP? ARP (Address Resolution Protocol) is used to map IP addresses to MAC addresses on a local network. It resolves IP addresses to MAC addresses so that data packets can be properly delivered within the network. 22. What is ICMP? ICMP (Internet Control Message Protocol) is a network protocol used to send error messages and operational information between network devices. It is commonly used for diagnostic and control purposes. 23. What is a proxy server? A proxy server is an intermediary server that sits between a client and a destination server. It intercepts requests from clients and forwards them to the destination server on behalf of the client, often providing additional functionality such as caching or filtering. 24. What is a VPN? A VPN (Virtual Private Network) is a secure connection established over a public network, such as the internet. It encrypts data transmitted between a client device and a VPN server, ensuring privacy and confidentiality.  25. Explain the difference between half-duplex and full-duplex communication. In half-duplex communication, data can be transmitted and received, but not simultaneously. In full-duplex communication, data can be transmitted and received simultaneously, allowing for faster communication.  26. What is bandwidth? Bandwidth refers to the maximum data transfer rate of a network or internet connection, typically measured in bits per second (bps), kilobits per second (kbps), or megabits per second (Mbps).  27.  What is latency? Latency is the time delay between the sending and receiving of data packets over a network. It is often measured in milliseconds (ms) and can be affected by factors such as network congestion and distance. 28. What is a subnet? A subnet is a logically segmented section of a larger network. It allows network administrators to divide a single network into smaller, more manageable parts for organizational or security purposes. 29. What is a network topology? Network topology refers to the physical or logical layout of devices and connections in a network. Common topologies include bus, ring, star, mesh, and hybrid configurations. 30. What is a LAN? A LAN (Local Area Network) is a network that spans a relatively small geographic area, such as a single building or campus. It typically connects devices owned by a single organization or individual. 31.  What is a WAN? A WAN (Wide Area Network) is a network that spans a large geographic area, such as a city, country, or even multiple countries. It connects LANs and other types of networks, allowing for long-distance communication. 32. What is a MAN? A MAN (Metropolitan Area Network) is a network that covers a larger geographic area than a LAN but smaller than a WAN. It typically spans a city or metropolitan area and connects multiple LANs together using high-speed connections such as fiber optics. 33. What is a wireless network? A wireless network is a type of network that uses wireless communication technology, such as Wi-Fi, to connect devices without the need for physical cables. It allows devices to communicate and access network resources over the airwaves. 34. What is SSID? SSID (Service Set Identifier) is a unique name that identifies a wireless network. It is used by wireless devices to identify and connect to specific wireless networks. 35. What is WEP, WPA, and WPA2? WEP (Wired Equivalent Privacy), WPA (Wi-Fi Protected Access), and WPA2 are security protocols used to secure wireless networks: WEP: An older and less secure encryption protocol for wireless networks. WPA: A more secure encryption protocol that replaced WEP and introduced stronger security features. WPA2: An even more secure version of WPA, which uses the Advanced Encryption Standard (AES) encryption algorithm. 35. What is MAC filtering?  MAC filtering is a security feature used to control access to a network by allowing or denying connections based on the MAC addresses of devices. Only devices with approved MAC addresses are allowed to connect to the network.  36.  What is a DHCP lease? A DHCP (Dynamic Host Configuration Protocol) lease is the amount of time that a dynamically assigned IP address is valid for a device. When a device connects to a network, it requests an IP address from a DHCP server, which leases the address to the device for a specified period.  37.  What is a DNS cache? A DNS cache is a temporary storage location on a device or network server that stores recently accessed DNS (Domain Name System) records. It helps to improve DNS resolution speed by reducing the need to query external DNS servers for frequently accessed domain names. 38. What is port forwarding? Port forwarding is a networking technique that redirects incoming network traffic from one port on a router or firewall to another port on a different device within the local network. It is commonly used to allow external access to services running on devices behind a NAT (Network Address Translation) router. 39. What is a DMZ? A DMZ (Demilitarized Zone) is a separate network segment that sits between an internal network and an external network, such as the internet. It is used to host publicly accessible services, such as web servers, while isolating them from the internal network for security purposes. 40. What is Quality of Service (QoS)? Quality of Service (QoS) is a set of techniques used to manage and prioritize network traffic to ensure optimal performance and quality for critical applications and services. It allows network administrators to allocate bandwidth, control latency, and minimize packet loss based on predefined policies.  41. What is a packet?  A packet is a unit of data transmitted over a network. It typically consists of a header containing control information, such as source and destination addresses, and a payload containing the actual data being transmitted. 42. What is packet switching? Packet switching is a networking technology that breaks data into smaller packets for transmission over a network. These packets are then routed independently through the network and reassembled at their destination. Packet switching allows for more efficient use of network resources and improved scalability.  43. What is a routing table?  A routing table is a data structure used by routers to determine the best path for forwarding packets to their destination. It contains information about network routes, including destination addresses, next-hop routers, and interface connections. 44. What is ARP poisoning? ARP (Address Resolution Protocol) poisoning is a network attack where an attacker sends false ARP messages to associate their MAC address with the IP address of another device on the network. This allows the attacker to intercept and manipulate network traffic intended for the targeted device.  45. What is a DoS attack?   A DoS (Denial of Service) attack is a cyberattack that aims to disrupt the normal functioning of a network, server, or website by overwhelming it with a flood of malicious traffic or requests. The goal is to make the targeted resource unavailable to legitimate users. 46.  What is a DDoS attack? A DDoS (Distributed Denial of Service) attack is similar to a DoS attack but involves multiple compromised devices, known as botnets, to launch coordinated attacks against a single target. DDoS attacks are often more difficult to mitigate due to the distributed nature of the attack traffic. 47.  What is subnetting? Subnetting is the process of dividing a single IP network into multiple smaller sub-networks, or subnets. It allows for better organization and management of IP addresses within a network and helps to improve network efficiency and security 48. What is NAT traversal? NAT traversal (Network Address Translation traversal) is a technique used to establish and maintain connections between devices on a private network and devices on the public internet, even when they are behind a NAT router or firewall. It enables communication between devices with private IP addresses and devices with public IP addresses. 49. Explain the concept of network redundancy. Network redundancy is the practice of duplicating critical network components, such as routers, switches, and connections, to ensure uninterrupted network operation in the event of component failure or network congestion. Redundancy helps to improve reliability, availability, and fault tolerance in a network.  

  • Pooja Pooja
Cybersecurity Interview Questions
Apr 15, 2024
Cybersecurity Interview Questions

In today's digital age, cybersecurity is of paramount importance. As organizations grapple with increasing cyber threats, the demand for skilled cybersecurity professionals continues to rise. Landing a cybersecurity job requires not only technical expertise but also the ability to effectively communicate your knowledge and experience during the interview process. To help you prepare, we've compiled a comprehensive guide to common cybersecurity interview questions and provided expert answers to help you ace your next interview.   1. What is cybersecurity? Cybersecurity refers to the practice of protecting systems, networks, and data from digital attacks. 2.  What are the main goals of cybersecurity? The main goals of cybersecurity are to ensure confidentiality, integrity, and availability of data and systems. 3. What is the CIA triad in cybersecurity? The CIA triad stands for Confidentiality, Integrity, and Availability. It is a model designed to guide policies for information security within an organization. 4. What is the difference between a virus and a worm? A virus requires user interaction to spread, such as opening an infected email attachment, while a worm can spread automatically without user intervention. 5. What is encryption? Encryption is the process of encoding data in such a way that only authorized parties can access it. 6. What is a firewall? A firewall is a network security device that monitors and controls incoming and outgoing network traffic based on predetermined security rules. 7. What is phishing? Phishing is a type of cyber attack where attackers attempt to trick individuals into providing sensitive information, such as passwords or credit card numbers, often by impersonating a trustworthy entity. 8. What is malware? Malware, short for malicious software, refers to any software intentionally designed to cause damage to a computer, server, or network. 9. What is a vulnerability? A vulnerability is a weakness or flaw in a system, application, or network that could be exploited by attackers to compromise security. 10. What is a patch?  A patch is a piece of software designed to update or fix a computer program or its supporting data, to address vulnerabilities or improve functionality. 11. What is the CIA triad in cybersecurity, and why is it important?  The CIA triad stands for Confidentiality, Integrity, and Availability. It's crucial because it provides a framework for evaluating and implementing security policies and controls. Confidentiality ensures that data is only accessible to authorized individuals, integrity ensures that data remains accurate and unaltered, and availability ensures that data and services are accessible when needed. 12. Explain the difference between symmetric and asymmetric encryption. Symmetric encryption uses the same key for both encryption and decryption, while asymmetric encryption uses a pair of keys: a public key for encryption and a private key for decryption. Symmetric encryption is faster and more efficient but requires secure key distribution, whereas asymmetric encryption provides better security but is slower. 13. What is a firewall, and how does it work?  A firewall is a network security device that monitors and controls incoming and outgoing network traffic based on predetermined security rules. It acts as a barrier between a trusted internal network and untrusted external networks, such as the internet, and blocks or allows traffic based on predefined policies. 14. Describe the concept of zero-day vulnerability. A zero-day vulnerability is a software vulnerability that is discovered by attackers before the software vendor releases a patch or fix for it. Since there is no patch available, attackers can exploit the vulnerability to launch attacks, and defenders have "zero days" to respond or mitigate the threat. 15. What is a DDoS attack, and how can it be mitigated?  A Distributed Denial of Service (DDoS) attack is a malicious attempt to disrupt the normal traffic of a targeted server, service, or network by overwhelming it with a flood of internet traffic. DDoS attacks can be mitigated by using specialized DDoS mitigation services, deploying firewalls and intrusion prevention systems, and working with internet service providers to filter out malicious traffic. 16.Explain the concept of social engineering and provide examples. Social engineering is a technique used by attackers to manipulate individuals into divulging confidential information or performing actions that compromise security. Examples include phishing emails, pretexting phone calls, and baiting with infected USB drives. 17. What is the difference between vulnerability assessment and penetration testing? Vulnerability assessment is the process of identifying and quantifying vulnerabilities in a system, whereas penetration testing is a controlled attack on a system to identify and exploit vulnerabilities to assess its security posture. Vulnerability assessment is typically automated and focuses on identifying weaknesses, while penetration testing is more manual and simulates real-world attacks. 18. How do you stay updated with the latest cybersecurity threats and trends? I stay updated by regularly reading cybersecurity blogs, following security researchers and organizations on social media, attending conferences and webinars, and participating in online communities and forums. Additionally, I continuously seek opportunities for professional development and training to enhance my skills and knowledge. 19. Describe a time when you had to respond to a security incident. In my previous role, we experienced a ransomware attack that encrypted critical files on our network. I immediately activated our incident response plan, isolated the affected systems, and notified relevant stakeholders. We worked with our IT team and external cybersecurity experts to contain the attack, restore data from backups, and implement additional security measures to prevent future incidents. 20. How do you prioritize security initiatives in an organization with limited resources? I prioritize security initiatives based on risk assessment, focusing on addressing the most critical vulnerabilities and threats that pose the greatest risk to the organization's assets and operations. I also leverage cost-effective solutions, such as open-source tools and automation, and prioritize collaboration and communication with stakeholders to ensure alignment with business goals and objectives. 21. What is multi-factor authentication (MFA), and why is it important? Multi-factor authentication (MFA) is a security mechanism that requires users to provide two or more forms of identification to access a system or application. This typically involves something the user knows (such as a password), something the user has (such as a smartphone or token), or something the user is (such as a fingerprint or facial recognition). MFA enhances security by adding an extra layer of protection against unauthorized access, even if one factor is compromised. 22. Explain the concept of least privilege and its importance in cybersecurity. Least privilege is the principle of restricting access rights for users, processes, and systems to only those necessary to perform their tasks. This minimizes the potential impact of security breaches or malicious activities by limiting the scope of access privileges. By adhering to the principle of least privilege, organizations can reduce the risk of unauthorized access, data breaches, and system compromises. 23. What is a security incident response plan, and why is it essential for organizations? A security incident response plan is a documented set of procedures and guidelines for detecting, responding to, and recovering from security incidents. It outlines the roles and responsibilities of individuals and teams involved in incident response, defines the steps to be taken during different stages of an incident, and establishes communication protocols with internal and external stakeholders. Having a robust incident response plan is essential for organizations to effectively manage and mitigate the impact of security incidents, minimize downtime, and maintain trust and credibility with customers and partners.   24. Describe the concept of encryption key management and its significance in data security. Encryption key management involves the generation, distribution, storage, and rotation of encryption keys used to encrypt and decrypt sensitive data. Proper key management is essential for ensuring the security and confidentiality of encrypted data. It includes processes for securely storing and protecting keys, managing access controls, and implementing procedures for key rotation and revocation. Effective encryption key management practices help prevent unauthorized access to encrypted data and mitigate the risk of data breaches or exposure. 25. What is the role of cybersecurity awareness training in an organization? Cybersecurity awareness training is a proactive approach to educating employees about cybersecurity risks, threats, and best practices. It aims to empower employees with the knowledge and skills to recognize and respond to security threats effectively. By raising awareness about common attack vectors, phishing scams, and social engineering tactics, cybersecurity awareness training helps reduce the likelihood of human error and improve overall security posture. It also fosters a culture of security awareness and accountability within the organization. 26. How does endpoint security help protect against cyber threats? Endpoint security refers to the protection of endpoints, such as desktops, laptops, smartphones, and other devices, from cybersecurity threats. It involves deploying security measures, such as antivirus software, firewalls, intrusion detection/prevention systems, and endpoint encryption, to detect, prevent, and remediate security incidents on individual devices. Endpoint security helps secure devices against malware, ransomware, unauthorized access, and other cyber threats, thereby safeguarding sensitive data and maintaining the integrity and availability of systems and applications. 27. What are some common cybersecurity best practices for securing a network? Some common cybersecurity best practices for securing a network include implementing strong access controls and authentication mechanisms, regularly updating and patching software and firmware, encrypting sensitive data both in transit and at rest, monitoring network traffic for anomalies and suspicious activities, conducting regular security audits and assessments, and training employees on cybersecurity awareness and safe computing practices. Additionally, deploying network segmentation, firewalls, intrusion detection/prevention systems, and security information and event management (SIEM) solutions can help enhance network security posture and resilience against cyber threats. 28. Explain the concept of a vulnerability scanner and how it helps identify security weaknesses. A vulnerability scanner is a software tool that scans computer systems, networks, and applications for security vulnerabilities, misconfigurations, and weaknesses. It performs automated scans to identify known vulnerabilities based on databases of vulnerabilities and signatures. By detecting vulnerabilities such as missing patches, insecure configurations, and outdated software versions, vulnerability scanners help organizations prioritize and remediate security issues before they can be exploited by attackers. Additionally, vulnerability scanners provide reports and recommendations for mitigating identified vulnerabilities and improving overall security posture. 29. What is the difference between a threat, a vulnerability, and a risk in cybersecurity? In cybersecurity, a threat refers to any potential danger or harmful event that may exploit a vulnerability and cause harm to an organization's assets or operations. A vulnerability is a weakness or flaw in a system, application, or network that could be exploited by threats to compromise security. A risk is the likelihood or probability of a threat exploiting a vulnerability and the potential impact or consequences of such an event. Risks are often assessed based on the severity of threats, the likelihood of exploitation, and the potential impact on confidentiality, integrity, and availability of assets and operations. 30. How do you assess the security posture of an organization's IT infrastructure? Assessing the security posture of an organization's IT infrastructure involves conducting comprehensive security assessments, audits, and evaluations to identify strengths, weaknesses, and areas for improvement. This may include reviewing security policies and procedures, conducting vulnerability scans and penetration tests, analyzing network traffic and logs, assessing compliance with regulatory requirements and industry standards, and evaluating the effectiveness of security controls and countermeasures. By assessing the security posture, organizations can identify gaps, prioritize security initiatives, and implement measures to strengthen their overall security posture and resilience against cyber threats.

  • Pooja Pooja
RPA Interview Questions and Answers
Mar 11, 2024
RPA Interview Questions and Answers

1. What is RPA, and how does it differ from traditional automation methods? RPA, or Robotic Process Automation, is a technology that uses software robots or "bots" to automate repetitive, rule-based tasks typically performed by humans. Unlike traditional automation methods that require significant changes to underlying systems, RPA operates at the user interface level, mimicking human interactions with applications. 2. What are the key benefits of implementing RPA in an organization? The key benefits of RPA include increased efficiency, accuracy, cost savings, scalability, improved compliance, and enhanced employee satisfaction. RPA allows organizations to streamline operations by automating mundane tasks, freeing up human resources for more value-added activities. 3. Can you explain the difference between attended and unattended RPA? Attended RPA involves bots working alongside human employees, typically on their desktops, to assist with tasks in real-time. Unattended RPA, on the other hand, operates autonomously without human intervention, usually on servers or virtual machines, performing scheduled tasks or batch processing. 4. What are some popular RPA tools in the market, and how do they differ? Some popular RPA tools include UiPath, Automation Anywhere, and Blue Prism. These tools vary in terms of features, pricing, ease of use, scalability, and integration capabilities. UiPath is known for its user-friendly interface and extensive community support, while Automation Anywhere offers robust scalability and cognitive automation features. Blue Prism is recognized for its enterprise-grade security and compliance capabilities. 5. How does RPA interact with legacy systems, and what challenges may arise in this integration? RPA interacts with legacy systems by automating tasks through the user interface layer, mimicking human actions such as clicking, typing, and copying/pasting. Challenges may arise due to the complexity of legacy systems, lack of standardization, and changes in user interfaces over time. RPA developers need to ensure robust error handling and adaptability to address these challenges. 6. What are the typical use cases for RPA implementation across different industries? Typical use cases for RPA implementation include data entry and migration, report generation, invoice processing, customer service automation, HR onboarding, IT support ticket resolution, regulatory compliance, and supply chain management, among others. RPA can be applied across various industries such as banking, healthcare, insurance, manufacturing, and retail to automate repetitive tasks and improve operational efficiency. 7. How do you measure the success of an RPA implementation, and what metrics are commonly used? The success of an RPA implementation can be measured using metrics such as cost savings, error reduction, process efficiency gains, employee productivity improvements, ROI (Return on Investment), customer satisfaction scores, and bot utilization rates. Organizations should define key performance indicators (KPIs) aligned with their strategic objectives to evaluate the impact of RPA on business outcomes. 8. What are the security considerations for RPA implementation, and how can they be addressed? Security considerations for RPA implementation include data encryption, access controls, secure credential management, audit trails, compliance with regulations (e.g., GDPR, HIPAA), and regular security assessments. Organizations should implement robust security measures to protect sensitive data, prevent unauthorized access, and mitigate potential risks associated with RPA deployment. 9. How does RPA handle exceptions and errors in automated processes, and what strategies can be used for effective error handling? RPA bots can be programmed to handle exceptions and errors by following predefined rules, logging errors for review, and triggering alerts for human intervention when necessary. Strategies for effective error handling include implementing retry mechanisms, exception logging, error notifications, and fallback procedures to ensure process resilience and continuity. 10. What are the limitations of RPA, and how can organizations overcome these limitations? Limitations of RPA include difficulties handling unstructured data, limited cognitive capabilities compared to humans, dependency on stable UI elements, and potential impacts on job roles. Organizations can overcome these limitations by combining RPA with cognitive technologies such as AI and machine learning, implementing process redesign initiatives, providing continuous training and upskilling for employees, and adopting a holistic automation strategy that includes both RPA and other automation techniques. 11. Can you explain the role of Artificial Intelligence (AI) in RPA, and how does it enhance automation capabilities? AI technologies such as machine learning, natural language processing, and computer vision can enhance RPA by enabling cognitive automation, sentiment analysis, and decision-making capabilities. AI-powered RPA bots can learn from experience, interpret unstructured data, extract insights, and make intelligent decisions, thereby expanding the scope of automation to more complex tasks and processes. 12. What is the role of governance in RPA implementation, and why is it important? Governance ensures that RPA projects adhere to organizational policies, standards, and regulatory requirements, addressing issues such as data privacy, security, and compliance. Governance frameworks define roles and responsibilities, establish controls, and provide oversight to ensure the responsible and ethical use of RPA across the organization. 13. How does RPA handle multi-step processes with dependencies, and what best practices should be followed? RPA can handle multi-step processes with dependencies by sequencing tasks, implementing conditional logic, and synchronizing interactions with external systems. Best practices include breaking down complex processes into smaller, manageable tasks, defining clear dependencies, error handling mechanisms, and ensuring proper coordination between bots and human actors to achieve desired outcomes. 14. What are the best practices for documenting RPA processes, and why is documentation important? Best practices for documenting RPA processes include creating process maps, documenting business rules and requirements, maintaining version control, and providing detailed descriptions of bot behavior. Documentation is important for knowledge sharing, training, troubleshooting, compliance, and ensuring continuity in case of personnel changes or system upgrades. 15. How do you manage the change associated with RPA implementation, and what strategies can be used to address resistance to automation? Change management involves stakeholder communication, training programs, process redesign, and addressing concerns about job displacement or role changes. Strategies to address resistance to automation include involving employees in the automation journey, highlighting the benefits of RPA, providing training and upskilling opportunities, and fostering a culture of innovation and continuous improvement. 16. What is the role of a Center of Excellence (CoE) in RPA, and how does it contribute to successful implementation? A Center of Excellence (CoE) provides governance, expertise, and support for RPA initiatives, promoting best practices, knowledge sharing, and continuous improvement across the organization. The CoE establishes standards, offers training and certification programs, facilitates collaboration among stakeholders, and drives innovation to ensure successful RPA implementation and adoption. 17. How do you handle data privacy and compliance issues in RPA projects, and what regulations should organizations be aware of? Data privacy and compliance are addressed by implementing encryption, access controls, data masking, and ensuring compliance with regulations such as GDPR (General Data Protection Regulation), HIPAA (Health Insurance Portability and Accountability Act), PCI DSS (Payment Card Industry Data Security Standard), and SOX (Sarbanes-Oxley Act). Organizations should conduct privacy impact assessments, document data processing activities, and establish mechanisms for obtaining consent and managing data subject rights. 18. What are the considerations for selecting the right processes for RPA, and how do you prioritize automation opportunities? Considerations for selecting processes for RPA include process complexity, volume, frequency, stability, rule-based nature, potential for ROI, and alignment with strategic business objectives. Organizations can prioritize automation opportunities by conducting process assessments, analyzing historical data, involving stakeholders in the decision-making process, and evaluating factors such as business impact and feasibility. 19. What are the key performance indicators (KPIs) used to measure RPA success, and how do you track and analyze these metrics? Key performance indicators (KPIs) used to measure RPA success include bot utilization rates, cycle time reduction, error rates, cost savings, ROI (Return on Investment), customer satisfaction scores, and employee productivity metrics. Organizations can track and analyze these metrics using RPA analytics tools, dashboards, and reporting mechanisms to monitor performance, identify areas for improvement, and demonstrate the value of automation to stakeholders. 20. Can you explain the concept of "citizen developers" in RPA, and how does it empower business users? Citizen developers are non-technical users who can build and deploy automation solutions using low-code or no-code platforms, empowering business users to automate tasks without extensive programming knowledge. Citizen developers can contribute to the democratization of automation, accelerate the development lifecycle, and drive innovation by leveraging their domain expertise and intimate knowledge of business processes. 21. How do you ensure the reliability of RPA bots, and what strategies can be used to minimize errors and failures? Reliability is ensured through thorough testing, monitoring, error handling mechanisms, regular maintenance, and adherence to coding standards and best practices. Strategies to minimize errors and failures include implementing robust exception handling, conducting regression testing, performing code reviews, maintaining documentation, and establishing monitoring and alerting mechanisms to detect anomalies and performance issues. 22. What is the role of a business analyst in RPA projects, and how do they collaborate with other stakeholders? Business analysts gather requirements, analyze processes, identify automation opportunities, define use cases, and collaborate with stakeholders to ensure successful RPA implementation. They act as liaisons between business users and RPA developers, translating business needs into technical specifications, conducting feasibility studies, and facilitating communication to align automation initiatives with strategic objectives and deliver value to the organization. 23. What is the importance of exception handling in RPA, and how can organizations effectively manage exceptions during bot execution? Exception handling is important in RPA to ensure the robustness and reliability of automated processes by addressing unexpected scenarios such as system errors, timeouts, or data discrepancies encountered during bot execution. Organizations can effectively manage exceptions by defining clear error handling strategies, implementing retry mechanisms, logging errors for analysis, and triggering alerts or notifications for human intervention when necessary to resolve issues and prevent process disruptions. 24. How does RPA support regulatory compliance efforts, and what features should organizations look for in RPA tools to ensure compliance? RPA helps enforce regulatory compliance by ensuring consistent adherence to rules and regulations, automating audit trails and reporting, and reducing the risk of human error and non-compliance. Organizations should look for features such as encryption, access controls, audit trails, role-based permissions, and compliance reporting capabilities in RPA tools to ensure compliance with regulations such as GDPR, HIPAA, PCI DSS, and SOX. 25. Can you explain the concept of "robots as a service" (RaaS), and what are the advantages of this deployment model? Robots as a Service (RaaS) refers to the provision of RPA capabilities as a cloud-based service, allowing organizations to access and deploy bots on-demand without the need for upfront infrastructure investment. The advantages of this deployment model include scalability, flexibility, reduced time to market, lower total cost of ownership, and simplified maintenance and upgrades, enabling organizations to rapidly scale automation initiatives and adapt to changing business needs. 26. What are the considerations for integrating RPA with existing IT infrastructure, and how can organizations ensure seamless integration and interoperability? Considerations for integrating RPA with existing IT infrastructure include compatibility with legacy systems, security requirements, API availability, data synchronization, performance impact, and change management processes. Organizations can ensure seamless integration and interoperability by conducting thorough system assessments, defining integration requirements, collaborating with IT teams, and implementing standardized integration patterns and best practices to enable data exchange and process orchestration across heterogeneous systems. 27. What are the differences between rule-based automation and RPA, and when is each approach suitable? Rule-based automation follows predefined rules and logic to perform tasks, while RPA mimics human actions on the user interface, enabling automation of processes across multiple applications without API access. Rule-based automation is suitable for tasks with well-defined rules and structured data, while RPA is more flexible and adaptable, capable of handling processes with variability, exceptions, and interactions across disparate systems. 28. How do you manage version control in RPA development, and why is it important to maintain version history? Version control in RPA development is managed using tools such as Git, SVN, or built-in features of RPA platforms, enabling developers to track changes, collaborate, and roll back to previous versions if needed. Maintaining version history is important for traceability, auditability, and collaboration, allowing teams to review changes, identify issues, and ensure consistency and reliability in bot development and deployment. 29. What are the advantages of using a cloud-based RPA solution, and what considerations should organizations evaluate when choosing a deployment model? Advantages of using a cloud-based RPA solution include scalability, flexibility, reduced infrastructure costs, rapid deployment, and access to advanced features and services. Organizations should evaluate considerations such as data security, regulatory compliance, performance, integration capabilities, vendor support, and total cost of ownership when choosing a deployment model (cloud-based, on-premises, or hybrid) to align with their business requirements and IT strategy. 30. Can you explain the concept of "robots as a platform" and how it enables interoperability and extensibility in RPA ecosystems? Robots as a platform refer to the concept of treating RPA bots as modular components or services that can be integrated with other systems and applications, enabling interoperability and extensibility in RPA ecosystems. By exposing bot functionality through APIs, web services, or integration connectors, organizations can leverage RPA capabilities to orchestrate end-to-end processes, integrate with third-party systems, and create composite automation solutions that span across multiple domains and technologies. 31. How do you handle security concerns related to RPA, and what measures should organizations implement to mitigate risks and ensure data protection? Security concerns related to RPA include data encryption, access controls, secure credential management, audit trails, compliance with regulations, and regular security assessments. Organizations should implement measures such as encryption at rest and in transit, role-based access controls, multi-factor authentication, secure credential vaults, activity logging, and periodic security audits to mitigate risks, protect sensitive data, and ensure compliance with regulatory requirements. 32. What are the limitations of RPA in terms of process complexity, and how can organizations address these limitations? Limitations of RPA in terms of process complexity include difficulties handling unstructured data, limited cognitive capabilities compared to humans, dependency on stable UI elements, and potential impacts on job roles. Organizations can address these limitations by combining RPA with cognitive technologies such as AI and machine learning, implementing process simplification and standardization initiatives, providing training and upskilling for employees, and adopting a phased approach to automation to gradually tackle more complex processes. 33. How does RPA interact with APIs and web services, and what are the best practices for integrating RPA with external systems? RPA interacts with APIs and web services through HTTP requests, RESTful APIs, SOAP APIs, or SDKs provided by external systems, enabling data exchange, process orchestration, and system integration. Best practices for integrating RPA with external systems include using industry-standard protocols and authentication mechanisms, error handling, data validation, retry mechanisms, and adhering to API usage limits and quotas to ensure reliability, security, and compliance. 34. What are the considerations for deploying RPA in a virtualized environment, and how does it impact scalability and performance? Considerations for deploying RPA in a virtualized environment include resource allocation, performance tuning, network connectivity, security, and compatibility with virtualization platforms (e.g., VMware, Hyper-V). Virtualization enables organizations to scale automation resources dynamically, optimize resource utilization, and achieve greater flexibility and cost efficiency in deploying RPA infrastructure and bots across distributed environments. 35. How do you ensure the scalability of RPA solutions to accommodate growing automation needs, and what scalability patterns can be applied? Scalability of RPA solutions can be ensured by designing modular, reusable automation components, adopting cloud-based deployment models, implementing load balancing and auto-scaling mechanisms, and leveraging distributed architectures and containerization technologies. Scalability patterns such as horizontal scaling (adding more bots) and vertical scaling (upgrading bot resources) can be applied to meet varying workload demands and accommodate growing automation needs effectively. 36. Can you explain the concept of "attended automation," and how does it differ from unattended automation? Attended automation involves bots working alongside human users to assist with tasks in real-time, typically on their desktops, interacting with applications as needed. Unattended automation, on the other hand, operates autonomously without human intervention, usually on servers or virtual machines, performing scheduled tasks or batch processing. Attended automation is suitable for tasks that require human judgment, decision-making, or intervention, while unattended automation is ideal for tasks that can be executed without direct supervision or interaction. 37. What are the key features of a good RPA tool, and how do you evaluate and select the right tool for your organization? Key features of a good RPA tool include ease of use, scalability, compatibility with existing systems, security features, vendor support, and total cost of ownership. Organizations can evaluate and select the right tool by conducting a thorough assessment of their automation requirements, performing proof-of-concept evaluations, considering user feedback and industry benchmarks, and engaging with vendors to understand their product roadmap, support offerings, and pricing models to make informed decisions aligned with their business objectives. 38. How do you handle exceptions in RPA processes, and what strategies can be used to recover from errors and ensure process continuity? Exceptions in RPA processes can be handled by implementing robust exception handling mechanisms, such as retry logic, error logging, exception notification, and fallback procedures. Strategies to recover from errors and ensure process continuity include identifying root causes, addressing underlying issues, implementing corrective actions, and triggering automated or manual interventions to resolve exceptions and resume normal operation without impacting downstream processes or stakeholders. 39. What are the advantages of using a cloud-based RPA solution, and how does it enable organizations to accelerate automation initiatives? Advantages of using a cloud-based RPA solution include scalability, flexibility, reduced infrastructure costs, rapid deployment, and access to advanced features and services such as AI, analytics, and cognitive automation. Cloud-based RPA enables organizations to accelerate automation initiatives by eliminating the need for upfront infrastructure investment, facilitating rapid provisioning and scaling of automation resources, and providing agility and scalability to adapt to changing business needs and market dynamics effectively. 40. Can you explain the concept of "robots as a platform" and how it enables interoperability and extensibility in RPA ecosystems? Robots as a platform refer to the concept of treating RPA bots as modular components or services that can be integrated with other systems and applications, enabling interoperability and extensibility in RPA ecosystems. By exposing bot functionality through APIs, web services, or integration connectors, organizations can leverage RPA capabilities to orchestrate end-to-end processes, integrate with third-party systems, and create composite automation solutions that span across multiple domains and technologies. 41. How do you handle security concerns related to RPA, and what measures should organizations implement to mitigate risks and ensure data protection? Security concerns related to RPA include data encryption, access controls, secure credential management, audit trails, compliance with regulations, and regular security assessments. Organizations should implement measures such as encryption at rest and in transit, role-based access controls, multi-factor authentication, secure credential vaults, activity logging, and periodic security audits to mitigate risks, protect sensitive data, and ensure compliance with regulatory requirements. 42. What are the limitations of RPA in terms of process complexity, and how can organizations address these limitations? Limitations of RPA in terms of process complexity include difficulties handling unstructured data, limited cognitive capabilities compared to humans, dependency on stable UI elements, and potential impacts on job roles. Organizations can address these limitations by combining RPA with cognitive technologies such as AI and machine learning, implementing process simplification and standardization initiatives, providing training and upskilling for employees, and adopting a phased approach to automation to gradually tackle more complex processes. 43. How does RPA interact with APIs and web services, and what are the best practices for integrating RPA with external systems? RPA interacts with APIs and web services through HTTP requests, RESTful APIs, SOAP APIs, or SDKs provided by external systems, enabling data exchange, process orchestration, and system integration. Best practices for integrating RPA with external systems include using industry-standard protocols and authentication mechanisms, error handling, data validation, retry mechanisms, and adhering to API usage limits and quotas to ensure reliability, security, and compliance. 44. What are the considerations for deploying RPA in a virtualized environment, and how does it impact scalability and performance? Considerations for deploying RPA in a virtualized environment include resource allocation, performance tuning, network connectivity, security, and compatibility with virtualization platforms (e.g., VMware, Hyper-V). Virtualization enables organizations to scale automation resources dynamically, optimize resource utilization, and achieve greater flexibility and cost efficiency in deploying RPA infrastructure and bots across distributed environments. 45. How do you ensure the scalability of RPA solutions to accommodate growing automation needs, and what scalability patterns can be applied? Scalability of RPA solutions can be ensured by designing modular, reusable automation components, adopting cloud-based deployment models, implementing load balancing and auto-scaling mechanisms, and leveraging distributed architectures and containerization technologies. Scalability patterns such as horizontal scaling (adding more bots) and vertical scaling (upgrading bot resources) can be applied to meet varying workload demands and accommodate growing automation needs effectively. 46. Can you explain the concept of "attended automation," and how does it differ from unattended automation? Attended automation involves bots working alongside human users to assist with tasks in real-time, typically on their desktops, interacting with applications as needed. Unattended automation, on the other hand, operates autonomously without human intervention, usually on servers or virtual machines, performing scheduled tasks or batch processing. Attended automation is suitable for tasks that require human judgment, decision-making, or intervention, while unattended automation is ideal for tasks that can be executed without direct supervision or interaction. 47. What are the key features of a good RPA tool, and how do you evaluate and select the right tool for your organization? Key features of a good RPA tool include ease of use, scalability, compatibility with existing systems, security features, vendor support, and total cost of ownership. Organizations can evaluate and select the right tool by conducting a thorough assessment of their automation requirements, performing proof-of-concept evaluations, considering user feedback and industry benchmarks, and engaging with vendors to understand their product roadmap, support offerings, and pricing models to make informed decisions aligned with their business objectives. 48. How do you handle exceptions in RPA processes, and what strategies can be used to recover from errors and ensure process continuity? Exceptions in RPA processes can be handled by implementing robust exception handling mechanisms, such as retry logic, error logging, exception notification, and fallback procedures. Strategies to recover from errors and ensure process continuity include identifying root causes, addressing underlying issues, implementing corrective actions, and triggering automated or manual interventions to resolve exceptions and resume normal operation without impacting downstream processes or stakeholders. 49. What are the advantages of using a cloud-based RPA solution, and how does it enable organizations to accelerate automation initiatives? Advantages of using a cloud-based RPA solution include scalability, flexibility, reduced infrastructure costs, rapid deployment, and access to advanced features and services such as AI, analytics, and cognitive automation. Cloud-based RPA enables organizations to accelerate automation initiatives by eliminating the need for upfront infrastructure investment, facilitating rapid provisioning and scaling of automation resources, and providing agility and scalability to adapt to changing business needs and market dynamics effectively. 50. Can you explain the concept of "robots as a platform" and how it enables interoperability and extensibility in RPA ecosystems? Robots as a platform refer to the concept of treating RPA bots as modular components or services that can be integrated with other systems and applications, enabling interoperability and extensibility in RPA ecosystems. By exposing bot functionality through APIs, web services, or integration connectors, organizations can leverage RPA capabilities to orchestrate end-to-end processes, integrate with third-party systems, and create composite automation solutions that span across multiple domains and technologies.1.  

  • Pooja Pooja
Vue.js Interview Questions With Answers
Jul 07, 2023
Vue.js Interview Questions With Answers

Vue.js, a progressive JavaScript framework, has gained significant popularity among developers for its simplicity, flexibility, and powerful features. If you're an aspiring Vue.js developer or preparing for a Vue.js interview, this article is here to help you navigate through common interview questions and provide insightful answers to enhance your understanding of the framework.   1) What is Vue.js?/ What do you understand by Vue.js? Vue.js is a progressive framework of JavaScript used to create Dynamic User Interfaces and single-page applications.   2) Why is Vue.js called a progressive framework? Vue.js called a progressive framework because it is being changed and developed continually.   3) Why is Vue.js supposed to be a competitor of Angular in upcoming days? Vue.js is also used to build User Interfaces and single-page applications like Angular. Nowadays, it is evolving very fast, and with time, new libraries and extensions are coming into existence. Many developers' community is using Vue.js, and the popularity of this JavaScript language is increasing day by day. That's why it is supposed to be a potential competitor of Angular.   4) Who is the founder/ inventor of Vue.js? Evan you is the founder of Vue.js. He was working at Google on several Angular projects when he founded Vue.js.   5) What is the VUE-resource? How would you install the Vue-Resource? The VUE-resource is a plug-in for Vue.js. This plug-in is used with Vue.js to make web requests and handle responses, in which XHMLHttpRequests or JSONP is used. You can use the following yarn or npm command to install VUE-resource: $ yarn add vue-resource   $ npm install vue-resource    6) How can you install Vue.js in your project? You can install Vue.js in your project by using the following 4 methods: Yu can use CDN by including     12) What do you understand by components props in Vue.js? In Vue.js, every component instance has its own isolated scope. So, you cannot directly reference parent data in a child component's template. Props are used to pass down data to the child components. Props are custom attributes. You can register on a component. When a value is passed to a prop attribute, it becomes a property on that component instance. Vue.component('blog-post', {     // camelCase in JavaScript     props: ['postTitle'],     template: ' {{ postTitle }} '   })     13) What is the requirement of Mixins in Vue.js? Mixins in Vue.js are a set of defined logic that is stored in a particular way. Mixins can be re-used repeatedly to add functionality to your Vue instances and components. Mixins are important because they provide a lot of functionalities. Following is the list of features that Mixins provide: Mixins facilitate you to easily adhere to the DRY principle and ensure that you do not repeat yourself. Mixins provide great flexibility. Mixin contains options for Vue components. You can use Mixins in Vue.js safely because they do not affect changes outside their defined scope. Mixins in Vue.js provide a great platform for code reusability. 14) What is Vuex? VueX is a state management pattern and library for the Vue.js application. It is used as a centralized store for all the different components in the Vue.js application. Vuex provides some rules to ensure that the state can only be mutated in a predictable fashion. You can get a lot of additional features by integrating Vuex with the official devtool extension of Vue.js.   15) What are filters in Vue.js? The Filters are functionality provided by Vue.js components that allow you to apply formatting and transformations to your dynamic template data. Filters are used in two places, mustache interpolations, and v-bind expressions. Filters don't change a component data or anything, but they only affect the output.   16) What are the main usages of filters in Vue.js? Following is the list of main usages of filters in Vue.js: Filters are mainly used to filter the data on the DOM level to provide you the data that is still intact in the storage but is represented in the custom specified manner. Filters are used to enhance the presentation of the view layer. The filters are also reusable. You can declare a filter globally and use it on any desirable component. Filters facilitate you to format your data at the view level. 17) Can we call Rest API from Vue.js? How? Yes, we can call Rest API from Vue.js. There are several HTTP libraries that can used to call REST Api's from Vue.js. One of the popular libraries is Axios. It is very simple to use and lightweight. You can include it in your project by using the following command. npm install axios --save   Implementing GET method using Axios in Vue JS   axios({ method: "GET", "URL": "https://httpbin.org/ip" }).then(result => {                   this.ip = result.data.origin;               }, error => {                   console.error(error);               });   18) How can you deploy the Vue.js application? You can create a project by using the following command: vue init webpack myproject   To run your project, run the following command: npm run build   After executing the above command, copy index.html and /dist/ folder into your website root directory, and your project will be deployed.   19) What is Vue-loader in Vue.js? The Vue-loader is a loader module for webpack in Vue.js that is used to write single file components using the .vue file format. The single-file component contains three sections called template, script, and style. The webpack can extract and process each section using separate loader modules such as the SASS or SCSS loaders. The vue-loader module makes static assets to be treated as module dependencies and enables processing using webpack loaders.   20) How can you handle Events in Vue.js? See the following example which demonstrates how to handle Events in Vue.js: HTML Code:        Name:      Say Hello button>   div>    JS Code: var myViewModel = new Vue({     el: '#app',     data: my Model,     // A click handler inside methods     methods: {       ClickHandler: function(e) {         alert("Hello " + this.name);       }     }    });   21) What are the most commonly used Directives in Vue.js? / What do you understand by the conditional directives in Vue.js? There are a set of directives in Vue.js used to show or hide elements according to the conditions. These directives are also known as conditional directives. v-if v-else v-else-if v-show v-model v-on v-if directive: The v-if directive is used to add or remove the DOM elements based on the given expression. For example, the below button will not show if isLoggedIn if you set it to false. Logout   The v-if directive also facilitates you to control multiple elements with a single v-if statement by wrapping all the elements in a element with the condition. For example, you can conditionally apply both label and button together.       Logout       Logout       v-else directive: The v-else directive is used to display content only when the expression adjacent v-if set to false. This is same as else block in any programming language to display alternative content and it is preceded by v-if or v-else-if block. You don't need to pass any value to this. For example, v-else is used to display LogIn button if isLoggedIn is set to false (not logged in).    Logout     Log In    v-else-if directive: The v-else-if directive is used when you want more than two options to be checked. For example, if you want to display some text instead of LogIn button when ifLoginDisabled property is set to true, you can achieve this through v-else statement.  Logout     User login disabled     Log In    v-show directive: The v-show directive is similar to v-if but it renders all elements to the DOM and then uses the CSS display property to show/hide elements. This directive is preferred if you want the elements to switch on and off frequently. Welcome user,{{user.name}}   22) What is the difference between v-show and v-if directives? The most common differences between v-show and v-if directives are given below: Index v-show directive v-if directive 1 The v-if directive is used to render the element to the DOM only if the expression passes. The v-show directive is used to render all elements to the DOM and then uses the CSS display property to show/hide elements according to the expression. 2 The v-if directive also supports v-else and v-else-if directives. The v-show directive doesn't support the v-else and v-else-if directives. 3 The v-if directive has higher toggle costs since it adds or removes the DOM every time. The v-show directive has higher initial render costs. 4 The v-if directive has the advantage when it comes to initial render time. The v-show directive has a performance advantage if you have to switch on and switch off the elements frequently. 5 The v-if directive supports the tab. The v-show directive doesn't support the tab. 23) What is the key in Vue.js? To render DOM elements more efficiently, Vue.js reuses the elements instead of creating a new element every time. The key is a kind of flag that tells Vue "if the data associated with this child component is moved somewhere else, then move the component along with it to preserve the changes that already exist."   24) Why is it recommended not to use v-if and v-for directives together on the same element in Vue.js? It is recommended not to use v-if and v-for directives together on the same element because the v-for directive has a higher priority than v-if directive. If you use both directives together, then there are two common cases where this may be tempting: When you have to filter items in a list (e.g. v-for="user in users" v-if="user.isActive"). In these cases, replace users with a new computed property that returns your filtered list (e.g., activeUsers). To avoid rendering a list if it should be hidden (e.g. v-for="user in users" v-if="shouldShowUsers"). In these cases, move the v-if to a container element (e.g., ul, ol). 25) How many types of the directive are used in Vue.js? The following types of directives are used in Vue.js: General Directives Literal Directives Empty Directives Custom Directives 26) What are the array detection mutation methods in Vue.js? As the name suggests, the array detection mutation methods in Vue.js are used to modify the original array. Following is a list of array mutation methods which trigger view updates: push() pop() shift() unshift() splice() sort() reverse() When you perform any of the above mutation methods on the list, then it triggers view update.   27) What are the array detection non-mutation methods in Vue.js? The array detection non-mutation methods in Vue.js are the methods that do not mutate the original array but always return a new array. Following is a list of the non-mutation methods: filter() concat() slice() For example, let's take a todo list where it replaces the old array with new one based on status filter: vmvm.todos = vm.todos.filter(function (todo) {     return todo.status.match(/Completed/)   })   28) What are the different event modifiers Vue.js provides? Normally, JavaScript provides event.preventDefault() or event.stopPropagation() inside event handlers. We can use Vue.js methods, but these methods are meant for data logic instead of dealing with DOM events. Vue.js provides the following event modifiers for v-on and these modifiers are directive postfixes denoted by a dot symbol. .stop .prevent .capture .self .once .passive See the following example of stop modifier:       Example of chain modifiers as follows:       29) Give an example to demonstrate how can you use event handlers? Event handlers are used in Vue.js are similar to plain JavaScript. The method calls also support the special $event variable. Example:      Submit      methods: {     show: function (message, event) {       // now we have access to the native event       if (event) event.preventDefault()       console.log(message);     }   }    30) Give an example to demonstrate how do you define custom key modifier aliases in Vue.js? We can define custom key modifier aliases via the global config.keyCodes. Following are some guidelines for the properties: We can't use camelCase. Instead, we should use a kebab-case with double quotation marks. We can define multiple values in an array format. See the example: Vue.config.keyCodes = {     f1: 112,     "media-play-pause": 179,     down: [40, 87]   }     31) What are the different supported System Modifier Keys in Vue.js? Vue.js supports the following modifiers to trigger mouse or keyboard event listeners when we press the corresponding keys. The list of supported System Modifier Keys is: .ctrl .alt .shift .meta See the following example of a control modifier with the click event. Example:      Do some action here   32) What is the requirement of local registration in Vue.js? In Vue.js, local registration is required when the global registration seems not ideal. For example, suppose you are using a build system like Webpack and globally registering all components. In that case, even if we stop using a component, it could still be included in your final build. This unnecessarily increases the amount of JavaScript your users have to download. In these cases, it is better to define your components as plain JavaScript objects as follows: var ComponentA = {/*.......*/}    var ComponentB = {/*.......*/}    var ComponentC = {/*.......*/}   After that define the components you would like to use in a components option as follows: new Vue({   el: '#app',   components: {   'component-a': ComponentA,   'component-b': ComponentA   }   })   33) What are the different supported Mouse Button Modifiers in Vue.js? Vue.js supports the following mouse button modifiers: .left .right .middle Example: The usage of .right modifier as follows:   v-if="button === 'right'"     v-on:mousedown.right="increment"     v-on:mousedown.left="decrement"   />   34) What are the supported modifiers on the v-model directive in Vue.js? Following are the three modifiers supported for the v-model directive in Vue.js: lazy: By default, the v-model directive syncs the input with the data after each input event. We can add the lazy modifier to instead sync after change events.        number: The number modifier is used to our v-model when we want user input to be automatically typecast as a number. With the type="number", the value of HTML input elements always returns a string. That's why this typecast modifier is required.    trim: We should add the trim modifier to our v-model when we want whitespace from user input to be trimmed automatically.    35) When the components need a single root element? In Vue.js 2.x version, every component must have a single root element when template has more than one element. In this case, you need to wrap the elements with a parent element.                   {{ title }}                        Otherwise, it will show an error, saying that "Component template should contain exactly one root element,"   The Vue.js 3.x version facilitates that the components now can have multiple root nodes. This way of adding multiple root nodes is called as fragments.          {{ title }}                  36) What do you understand by global registration in components in Vue.js? The global registration in components in Vue.js facilitates us to use it in the template of any root Vue instance (new Vue) created after registration. In the global registration, the components created using Vue.component as follows: Vue.component('my-component-name', {     // ... options ...   })   We can take multiple components which are globally registered in the vue instance, Vue.component('component-a', { /* ... */ })   Vue.component('component-b', { /* ... */ })   Vue.component('component-c', { /* ... */ })   new Vue({ el: '#app' })   The above components can be used in the vue instance as follows:                          37) What is the purpose of using v-for directive in Vue.js? In Vue.js, the v-for directive is used because it allows us to loop through items in an array or object. By using this directive, we can iterate on each element in the array or object. Example of v-for directive usage in Array:                {{ index }} - {{ item.message }}           var vm = new Vue({     el: '#list',     data: {       items: [         { message: 'Alex' },         { message: 'Muler' }       ]     }   })   We can also use the delimiter instead of in, similar to JavaScript iterators. Example of v-for directive usage in Object:                {{ index }}. {{ key }}: {{ value }}           var vm = new Vue({     el: '#object',     data: {       user: {         firstName: 'Alex',         lastName: 'Muller',         age: 30       }     }   })   38) Give an example to demonstrate how do you reuse elements with key attribute? Vue.js always facilitates us to render elements as efficiently as possible. So, it is possible to reuse the elements instead of building them from scratch. But this can create problems in few scenarios. For example, if you try to render the same input element in both v-if and v-else blocks then it holds the previous value as follows:      Admin                Guest           In the above case, we should not reuse it. It is better to make both input elements as separate by applying key attribute as follows:      Admin                Guest           In the above example, both inputs are independent and do not impact each other.   39) Why is it recommended to use a key attribute for directive? It is recommended to use a key attribute for a directive to track each node's identity and thus reuse and reorder existing elements. We have to provide a unique key attribute for each item with in v-for iteration. An ideal value for the key would be the unique id of each item. Example:        {{item.name}}      That's why it is always recommended to provide a key with v-for whenever possible unless the iterated DOM content is simple.   40) What do you understand by the array detection non-mutation methods? The methods that do not mutate the original array but always return a new array are known as non-mutation methods. Following is a list of the non-mutation methods: filter() method concat() method slice() method Let's take an example to understand it better. We have a todo list replacing the old array with a new one based on the status filter. Example: vmvm.todos = vm.todos.filter(function (todo) {     return todo.status.match(/Completed/)   })   This approach would not re-render the entire list due to Vue.js implementation.   41) How can you redirect to another page in Vue.js? In Vue.js, if you are using vue-router, you should use router.go(path) to navigate to any particular route. You can access the router from within a component using this.$router. router.go() changed in Vue.js 2.0. You can use router.push({ name: "yourroutename"}) or just router.push("yourroutename") now to redirect.   42) What do you understand by slots in Vue.js? In Vue.js, the element is used to serve as distribution outlets for content. Let's take an example to create an alert component with slots for content insertion. Example: In Vue.js, the element is used to serve as distribution outlets for content. Let's take an example to create an alert component with slots for content insertion. Example: Vue.component('alert', {     template: `                 Error!                `   })   We can insert dynamic content as follows:      There is an issue with in application.      43) What are the problems solved by Single File Components in Vue.js? In Vue.js, the Single File Components are used to solve the common problems in a JavaScript-driven application with a .vue extension. Following is a list of issues solved by Single File Components in Vue.js: Global definitions specify unique names for every component. String templates lack syntax highlighting and require ugly slashes for multiline HTML. No CSS support. It means while HTML and JavaScript are modularized into components, CSS is conspicuously left out. No, build step restrictions to HTML and ES5 JavaScript, rather than preprocessors like Pug and Babel. 44) What are the different ways to create filters? < There are two ways to define filters: Local filters: You can define local filters in a component's options. In this case, filter is applicable to that specific component. filters: {     capitalize: function (value) {       if (!value) return ''       valuevalue = value.toString()       return value.charAt(0).toUpperCase() + value.slice(1)     }   }   Global filters: You can also define a filter globally before creating the Vue instance. In this case, filter is applicable to all the components within the vue instance, Vue.filter('capitalize', function (value) {     if (!value) return ''     valuevalue = value.toString()     return value.charAt(0).toUpperCase() + value.slice(1)   })   new Vue({     // ...   })   45) What do you understand by mapState helper? In the Vuex application, creating a computed property every time whenever we want to access the store's state property or getter is going to be repetitive, difficult, and boring, especially if a component needs more than one state property. In this situation, we can use the mapState helper of vuex, which generates computed getter functions for us. In the following increment example, we have demonstrated the mapState helper: // in full builds helpers are exposed as Vuex.mapState   import { mapState } from 'vuex'   export default {     // ...     computed: mapState({       // arrow functions can make the code very succinct!       username: state => state.username,       // passing the string value 'username' is same as `state => state.username`       usernameAlias: 'username',       // to access local state with `this`, a normal function must be used        greeting (state) {         return this.localTitle + state.username       }     })   }   You can also pass a string array to mapState when the name of a mapped computed property is the same as a state sub-tree name computed: mapState([     // map this.username to store.state.username     'username'   ])   46) What are the most prominent features of stylelint? Following is a list of the most prominent features of stylelint: The stylelint has more than 160 built-in rules to catch errors, apply limits and enforce stylistic conventions. It understands the latest CSS syntax, including custom properties and level 4 selectors. It extracts the embedded styles from HTML, markdown, and CSS-in-JS object & template literals. It is also used to parse CSS-like syntaxes like SCSS, Sass, Less, and SugarSS. It supports for reusing community plugins and creating their plugins. 47) What is a single-file component in Vue.js? In Vue.js, a single-file component is a file with a .vue extension that contains a Vue component. The single-file component consists of the component's template, logic, and styles, all bundled together in one file. It also contains one

  • Sumasri Sumasri
Node.js Interview Questions With Answers
Jun 30, 2023
Node.js Interview Questions With Answers

Node.js, an open-source runtime environment, has gained immense popularity among developers for its ability to build scalable and high-performance web applications using JavaScript. If you're a student or a young professional looking to enhance your knowledge of Node.js or prepare for an interview, this article is designed to provide you with essential questions and their corresponding answers to help you navigate through the interview process confidently.   1. What is Node.js? Node.js is a JavaScript runtime environment built with Chrome’s V8 JavaScript engine as a platform. It’s popular because it’s lightweight and efficient, due to its event-driven and non-blocking I/O model. Built with performance as its primary focus, Node.js processes the JavaScript code into the native machine code, which your computer can use to execute processes.  Even though Node.js is based on Chrome’s V8 engine, it doesn’t run in the browser itself. During development, various features like file system API, HTTP library and OS utility methods were added to the engine, so Node.js could be executed as a program on a computer.   2. How are “Child Threads” handled in Node.js? Primarily, Node.js is a single-thread process. It doesn’t expose any child threads and the modes of thread management to the developer. However, child threads may be generated in Node.js in various processes like asynchronous I/O. Although the child threads spawned through these processes run in the backdrop, they don’t block the main code or execute any application code. But if you require threading support in an application powered by Node.js, multiple tools are available for utilization.   3. What are some differences between Angular JS and Node.js? Below are some differences between Angular JS and Node.js AngularJS Node.js Written in TypeScript Written in a variety of languages, like C, C++, and JavaScript Great for creating highly interactive web pages Suited for small-scale projects and applications Open Source framework for web development Runtime environment based on multiple platforms Used to create single-page applications for client-side Used to create server-side networking applications Helps split an application into model-view-controller (MVC) components Helps generate queries for databases Appropriate for developing real-time applications Appropriate for situations requiring quick action and scaling  Angular itself is a web application framework Node.js has many frameworks, including Express.js, Partial.js and more   4. State the primary uses of Node.js. Here are some of Node.js functions:  Complex single-page applications: Node.js is ideal for creating complex, single-page applications, like online drawing tools, mail solutions, and social networking. These types of applications are limited to one page, with UX similar to that of a desktop application. Node.js can be used here due to its asynchronous data flow in the backend. Real-time applications (RTA): We use several real-time applications in day-to-day life like Google Docs, Slack, Skype, WhatsApp and many more. Node.js’ event API, WebSockets, and asynchronous data flow ensure a faultless server operation, which updates the data instantly. Chat rooms: This may be clubbed under RTA, but since instant messaging and chatting has emerged as one of the top real-time application models, it needs a special focus. If you have a chat room product, you’re looking at requirements like lightweight, high traffic capacity and substantial data flow. Node.js and someJavaScript frameworkat the backend fulfills all these requirements. The aforementioned web sockets come in handy for receiving and sending messages in a chat room environment. Browser-based games: The above-mentioned chat rooms can also be integrated into browser-based games, where Node.js is a perfect choice. Combining the Node.js technology with HTML5 and even JS tools will help you create real-time browser-based games. Data streaming applications: The key selling point of these applications is that their data processing in the unloading phase. Through this, some parts can be downloaded upfront to keep the connection and download other parts later. In this context, Node.js streaming applications deal with both audio and video data. Representational State Transfer (REST) Application Programming Interfaces (APIs): APIs based on REST hold a key position in the construction of modern commercial software architecture due to the wide usage of the HyperText Transfer Protocol (HTTP). The Express.js framework of the Node.js ecosystem can help build fast and light REST APIs. Server-side web applications: While Node.js and its frameworks can help in creating server-side web applications, you can’t expect CPU-heavy operations. Command Line Tools: Node.js’ expansive ecosystem helps build CLT — check out online tutorials to build your own.    5. What is event-driven programming? The event-driven programming approach uses events to trigger various functions. In this scenario, an event can be anything, such as pressing a key or clicking a mouse button. Whenever an event occurs, a call-back function already registered with the element is executed, following the “publish-subscribe” pattern. Due to this programming approach, Node.js is faster than other comparable technologies.   6. In the context of Node.js, what is REPL? REPL is Read, Eval, Print and Loop. REPL is a computer environment (similar to a Windows console or Linux shell) where any entered command is met with a system-response output. The REPL environment is bundled with Node.js by default, and it performs the following tasks: Reads user inputs, converts them into JavaScript data-structures, and stores them. Evaluates data structures. Prints the final output Loops the provided command until CTRL + C is pressed two times.   7. What is a test pyramid in Node.js? A test pyramid is a figure that explains the proportions of unit tests, integration tests, and end-to-end tests required to successfully develop a project: Unit tests: They test the individual units of code quickly, in isolation.  Integrations tests: They test the integration among dissimilar units. End-to-end (E2E) tests: They test the system as a whole, right from the user interface to the data store, and back.   8. What is libuv? Libuv is a support library of Node.js used for asynchronous input/output. While it was initially developed just for Node.js, it now witnesses practice with other systems such as Luvit, Julia, Pyuv, and more. Some of its features include:  File System Events Child Processes Full-featured event loop backed Asynchronous TCP & UDP sockets   9. Is Node.js the best platform for CPU-heavy applications? CPU-incentive applications are not a strong suit of Node.js. The CPU-heavy operations block incoming requests and push the thread into critical situations.   10. What is the purpose of the Express JS Package? Built on top of Node.js, ExpressJS is a JS framework that manages the flow of information between the routes and server in server-side apps. Being lightweight, flexible, and filled with relevant features, it’s great for mobile and web application development.   11. What are the main differences between Node.js vs. Javascript? Node.js JavaScript Cross-platform open source JS runtime engine.  A high-level scripting language based on the concept of OOPS. Code can be run outside the browser.  Code can run only in the browser. Used on server-side. Used on client-side. No capabilities to add HTML tags. Can add HTML tags. Can be run only on Google Chrome's V8 engine. Can be run on any browser.   12. What are the major benefits of Node.js? The benefits of Node.js are: Easy to learn and huge community support. Easy scalability and high performance. Highly extensible with extended support. Supports full-stack JavaScript. Caching mechanism allows web pages to load faster. Non-blocking I/O systems.   13. What is the difference between asynchronous and non-blocking? Asynchronous or non-synchronous means that we will not receive a response to a message immediately — there is no dependency or order of execution. The server stores information and acknowledges when the action is performed. This improves performance and efficiency. The non-blocking operation does not stop or block any operations. The difference is that a non-blocking operation receives a response immediately with whatever data is available. If data is not available, it returns an error. It is mostly used with I/O.   14. What is package.json? The npm packages contain a file package.json in the project root folder, which contains the metadata relevant to the project. It gives information to the npm through which npm identifies a project and its dependencies. Apart from this, it contains other metadata like project description, version, license information, and configuration data.    15. Describe the error-first callback in Node.js. The error-first callback, also called as errorback gives the error and data. It takes a few arguments, the first one being the error object and others being the data. The error-first callback pattern has many advantages: since it is consistent, leads to more adoption, if there is no reference to the data, there is no need to process it. If there is no error, the callback is called with null as the first argument.  Advanced Node.js Interview Questions for Experienced Professionals Now we move onto advanced node interview questions. Remember to be able to put these concepts into practice.   16. Explain the purpose of module.exports. These tell Node.js when parts of the code that like objects, functions, strings etc. should be exported from a given file so other files can access it. Suppose we have this module:  {   id: '.',   exports: {},   parent: null,   filename: '/modtest.js',   loaded: false,   children: [],   paths:   [   '/node_modules',   '/Users/node_modules',   '/Users/mycomp/projects/node_modules',   '/node_modules'   ]   } Note the export property is empty. If we apply code to this property, that will become the export of the module. If we require the module in another file, that will be the export property value: module.exports.stringProperty = "Hello, welcome";   console.log(module);   {   id: '.',   exports: { stringProperty: 'Hello, welcome' }   ...   }   17. What is the reactor pattern in Node.js? The reactor pattern is a concept of non-blocking I/O operations in Node.js. Through this pattern, we get the handler (or callback function) for each I/O operation. Each I/O request is submitted to a demultiplexer that handles concurrency and queues the requests/events. It consists of resources, event notifier/demultiplexer, event loop, event queue, request handler, and more.    18. Explain LTS releases of Node.js. LTS or Long-Term Support is applied to release lines supported and maintained by the Node.js project for an extended period. There are two types of LTS:  Active, which is actively maintained and upgraded, and  Maintenance line nearing the end of the line and maintained for a short period.   19. What is a URL module? The URL module provides APIs to work with URLs: a legacy API specific to Node.js. newer API that implements WHATWG URL (standard used by web browsers). Some example methods are URL.port, URL.password, URL.host, url.toString() under the URL class. For the full documentation, check the officialURL module page.   20. Explain control flow function. Control flow function is the sequence in which statements or functions are executed. Since I/O operations are non-blocking in Node.js, control flow cannot be linear. Therefore, it registers a callback to the event loop and passes the control back to the node, so that the next lines of code can run without interruption. For example: [code language="javascript"]   fs.readFile('/root/text.txt', func(err, data){   console.log(data);   });   console.log("This is displayed first");   [/code] In this, the readFile operation will take some time; however, the next console.log is not blocked. Once the operation completes, you’ll see the displayed data.    21. What are the main differences between the spawn() and fork() methods in Node.js? Spawn Fork Designed to run system commands. A special instance of spawn() that runs a new instance of V8. Does not execute any other code within the node process.  Can create multiple workers that run on the same Node codebase. child_process.spawn(command[, args][, options]) creates a new process with the given command.  Special case of spawn() to create child processes using. child_process.fork(modulePath[, args][, options]) Creates a streaming interface (data buffering in binary format) between parent and child process. Creates a communication (messaging) channel between parent and child process. More useful for continuous operations like data streaming (read/write). For example, streaming images/files from the spawn process to the parent process. More useful for messaging. For example, JSON or XML data messaging. 22. What is the purpose of the ExpressJS package in Node.js? ExpressJS package or framework is built on top of Node.js to fast-track the development of single-page, multi-page and hybrid server-based applications. Express is said to be the backend part of the MEAN stack.   23. Highlight the differences between process.nextTick() and setImmediate(). let execseq = function() {    setImmediate(() => console.log("immediate"));    process.nextTick(() => console.log("nextTick"));    console.log("event loop");   } This will execute the "event loop," "nextTick," and "immediate.”   24. What is the difference between Node.js vs. Ajax? Ajax is a client-side technology that updates page content without refreshing the page. Node.js is a server-side JavaScript used to develop server software. Further, Node.js is a full-fledged development environment, whereas Ajax just obtains data or runs scripts.   25. Why must the express “app” and “server” be separated? If we keep the app and server functionalities separate, the code can be divided into multiple modules, which reduces the dependency between modules. Each module will perform a single task. Finally, the separation of logic helps avoid duplicate code.   26. Explain the difference between setImmediate() vs setTimeout(). While the word immediate is slightly misleading, the callback happens only after the I/O events callbacks. When we call setImmediate()., setTimeout() is used to set a delay (in milliseconds) for the execution of a one-time callback. If we execute:  setImmediate(function() {   console.log('setImmediate')   })   setTimeout(function() {   console.log('setTimeout')   }, 0) We will get the output as “setTimeOut” and then “setImmediate.”   27. List and explain the popular modules of Node.js. Here are Node.js’ core modules:  http Includes classes, methods, and events for creating Node.js http server. URL Contains methods for URL resolution and parsing. querystring Deals with query string. path Contains methods for working with file paths. fs Consists of classes, methods, and events for handling file I/O. util Includes utility functions useful for developers.   28. What is an example of reading and writing streams? Here’s an example of reading stream: var readStream = fs.createReadStream('data.txt');   readStream.on('data', function(chunk) {   data += chunk;   });   Here’s an example of reading into stream:   var writeStream = fs.createWriteStream('dataout.txt');   writeStream.write(data,'UTF8');   writeStream.end();   29. What is the crypto module in Node.js? How is it used? The crypto module in Node.js is used for cryptography, i.e., it includes a set of wrappers for the open SSL's hash, HMAC, sign, decipher, cipher, and verify functions. Here’s an example of using a cipher for encryption: const crypto = require('crypto');    const cipher = crypto.createCipher('usrnm', 'pwdd');    var encryptd = cipher.update('Welcome to hackr', 'utf8', 'hex');    encryptd += cipher.final('hex');    console.log(encryptd); Let’s use decipher to decrypt the above to see if we get the same text back: const crypto = require('crypto');    const decipher = crypto.createDecipher('usrnm', 'pwdd');    var encryptd = '';    var decryptd = decipher.update(encryptd, 'hex', 'utf8');    decryptd += decipher.final('utf8');    console.log(decryptd);   30. Explain the DNS module. The DNS module is used for resolving a name and an actual DNS lookup. With this module, it is not required to memorize the IP addresses as the DNS servers convert domain/subdomain into IP addresses.   31. Explain the security mechanism of Node.js. The security mechanisms are: Authorization codes: Authorization codes help secure Node.js from unauthorized third parties. Anyone who wants to access Node.js goes through the GET request of the resource provider's network.  Certified Modules: Certification modules are like filters that scan the libraries of Node.js to identify if any third-party code is present or not. Any hacking can be detected using certifications.  Curated Screening register: This is a quality control system where all the packages (code and software) are checked to ensure their safety. This scan helps to eliminate unverified or unreliable libraries getting into your application. Regular updates: Downloading the newest version of Node.js will prevent potential hackers and attacks.    32. Explain the various types of API functions in Node.js. The two types of API functions in Node.js are: Asynchronous/Non-blocking: These requests do not wait for the server to respond. They continue to process the next request, and once the response is received, they receive the same. Synchronous/Blocking: These are requests that block any other requests. Once the request is completed, only then is the next one taken up.   33. What are LTS versions of Node.js? Long-term Support or LTS version are Node.js releases calling the critical fixes, performance step-ups, and security updates. These versions receive support for at least 1.5 years and focus on the application’s security and stability.   34. Explain how assert works.  Assert is used to write tests in Node.js. The feedback is provided only if any of the test cases that are running fail. To test invariants, the module gives you a set of assertion tests. It is used internally by Node.js, but if you use the require (‘assert’) code, you will be able to use it in other applications as well.   35. What is callback hell? In Node.js, callback hell is also known as the Pyramid of Doom. These are caused by intensively nested, unreadable, and unmanageable callbacks, making the code harder to read and debug. It is caused due to improper execution of the asynchronous logic.   36. What is a stub in Node.js? Stubs are programs or functions used to stimulate component behavior. Stubs provide the answers to the functions during test cases.   37. What is an Event Loop? Node.js handles asynchronous callbacks. This is the foundation of the non-blocking input/output in Node.js, making it one of the most vital features. Remember, Node.js is event driven. Due to the nature of Node.js being event-driven, a listener can be attached to an event for the callback to be executed by the former when the event occurs.  Node.js executes the event loop and then moves on to the rest of the code, without having to wait for the output. Once the whole operation culminates, it receives the output and the callback function is executed. Once it receives the response, the functions are executed one by one.   38. What are streams in Node.js? What are the types? In Node.js, streams are the collection of data similar to strings and arrays. Moreover, streams are objects through which you can read source data or write destination data continuously. These streams are particularly helpful for reading and processing large amounts of information. There are four types of streams in Node.js, which are: Readable: Used to read large amount of data from source Writeable: Used to write data to destination Duplex: Used for both read and write Transform: A duplex stream used for data modification   39. List and explain the timing features of Node.js. A timer module containing multiple functions for the execution of the code after a specific time period is provided by Node.js. Some of the functions provided in this module are: process.nextTick: This function schedules a callback function which is required to be invoked in the next iteration of the event loop setTimeout/clearTimeout: This function schedules code execution after the assigned amount of time (in milliseconds) setImmediate/clearImmediate: This functions executes code at the conclusion of the existing event loop cycle setInterval/clearInterval: This function is used to execute a block of code a number of times   40. Highlight the differences between process.nextTick() and setImmediate(). Both process.nextTick() and setImmediate() are functions of the Timers module, but the difference lies in their execution. The process.nextTick() function waits for the execution of action till the next pass around in the event loop or when the event loop culminates, only then is the callback function invoked. The setImmediate() function is used for callback method execution on the next cycle of the event loop, which returns it to the event loop for the execution of the input/output operations.   41. Explain readFile and createReadStream in Node.js. Both readFile and createReadStream are ways to read and execute files provided by Node.js. The readFile process is fully buffered which returns response(s) only if the complete file is entered into the buffer and can be read. This process is highly memory intensive and can become slow in case the file size is large. The createReadStream process is partially buffered, treating the entire process as a series of events. In this process, the whole files are split into chunks that are processed and then sent as a response individually in succession. Unlike readFile, createReadStream is effective when it comes to reading and processing large files.   42. Does Node.js provide a debugger? A built-in TCP protocol and the debugging client is provided by Node.js. If you wish to debug your file, you can use the following argument before the name of your JS file which you wish to debug. node debug [script.js | -e “script” | :]   43. Describe the exit codes in Node.js. Exit codes in Node.js are a specific group of codes that finish off processes, which can include global objects as well. Some of the exit codes in Node.js are: Internal JavaScript Evaluation Failure Fatal Error Internal Exception handler Runtime failure Unused Uncaught fatal exception   44. Why is NODE_ENV used? When any Node.js project is in the stage of production, Node.js promotes the principle to use the NODE_ENV variable to flag it. When the NODE-ENV is set to production, your application will perform at a speed 2 to 3 times faster than usual. The variable also improves judgment during the development phase of projects.   45. What is EventEmitter in Node.js? Node.js has an EventEmitter class which holds all the objects which can emit events. These objects hold a function called eventEmitter.on() using which multiple functions can be attached to the event emitted by the object. Whenever an object from the EventEmitter class throws an event, all the attached functions to the event are called upon synchronously.   46. What is Punycode? Punycode can be defined as an encoding syntax in Node.js which is helpful for converting the Unicode string of characters into ASCII. This is done as the hostnames can only comprehend ASCII codes and not Unicode. While it was bundled up within the default package in recent versions, you can use it in the previous version using the following code: punycode = require(‘punycode’);   47. Explain the concept of JIT and highlight its relationship with Node.js. A JIT or Just-in-time compiler sends bytecode (consisting of interpretable instructions) to the processor by converting it into instruction. Once you are finished with the writing part of a program, the source language statements are compiled into bytecode by the compiler, rather than the code that carries the data which is similar to the destination hardware platform processor. Node.js employs JIT compilation which improves the speed of code execution to a great extent. It takes the source code and converts it into machine code at runtime. Through this, functions that are called regularly are compiled to machine code, increasing the overall speed of code execution.   48. Why is the buffer class used in Node.js? In Node.js, the buffer class stores the raw data, in a manner similar to that of an array of integers. However, it communicates to a raw memory dump, allocated outside the V8 heap. The Buffer class is a global class and can be accessed in an application without having to import the buffer module. It is typically used as pure JavaScript code is not attuned with binary data.   49. How do the fork and spawn methods work?  In Node.js, spawn () launches a new process with the available set of commands. This doesn’t generate a new V8 instance; only a single copy of the node module is active on the processor. This method can be used when your child process returns a large amount of data to the node. On the other hand, fork () is a particular case of spawn () which generates a new V8 engine instance. Through this method, multiple workers run on a single node code base for multiple tasks.   50. State the steps to write an Express JS application. To set up an ExpressJs application, you need to go through the following steps: Create a folder with the project name Create a file named package.json inside the folder Run the ‘npm install’ command on the command prompt to install the libraries present in the package file\ Create a file named server.js Create the ‘router’ file inside the package consisting of a folder named as index.js

  • Sumasri Sumasri
Big Data Interview Questions With Answers
May 19, 2023
Big Data Interview Questions With Answers

In today's digital age, data has become a valuable asset for organizations across various industries. Big Data refers to the massive volume, velocity, and variety of data that requires specialized tools and technologies to capture, store, process, and analyze effectively. In this article, we will delve into an insightful interview discussing Big Data, its applications, challenges, and the skills required to excel in this dynamic field.   We have prepared a collection of questions to be asked in the interview which can help you with the preparation. 1. Define Big Data and explain the Vs of Big Data. This is one of the most introductory yet important Big Data interview questions. The answer to this is quite straightforward: Big Data can be defined as a collection of complex unstructured or semi-structured data sets which have the potential to deliver actionable insights. The four Vs of Big Data are – Volume – Talks about the amount of data Variety – Talks about the various formats of data Velocity – Talks about the ever-increasing speed at which the data is growing Veracity – Talks about the degree of accuracy of data available   2. How is Hadoop related to Big Data? When we talk about Big Data, we talk about Hadoop. So, this is another Big Data interview question that you will definitely face in an interview. Hadoop is an open-source framework for storing, processing, and analyzing complex unstructured data sets for deriving insights and intelligence.   3. Define HDFS and YARN, and talk about their respective components. Now that we’re in the zone of Hadoop, the next Big Data interview question you might face will revolve around the same. The HDFS is Hadoop’s default storage unit and is responsible for storing different types of data in a distributed environment. HDFS has the following two components: NameNode – This is the master node that has the metadata information for all the data blocks in the HDFS. DataNode – These are the nodes that act as slave nodes and are responsible for storing the data. YARN, short for Yet Another Resource Negotiator, is responsible for managing resources and providing an execution environment for the said processes. The two main components of YARN are – ResourceManager – Responsible for allocating resources to respective NodeManagers based on the needs. NodeManager – Executes tasks on every DataNode.   4. What do you mean by commodity hardware? This is yet another Big Data interview question you’re most likely to come across in any interview you sit for. Commodity Hardware refers to the minimal hardware resources needed to run the Apache Hadoop framework. Any hardware that supports Hadoop’s minimum requirements is known as ‘Commodity Hardware.’   5. Define and describe the term FSCK. FSCK stands for Filesystem Check. It is a command used to run a Hadoop summary report that describes the state of HDFS. It only checks for errors and does not correct them. This command can be executed on either the whole system or a subset of files. Read: Big data jobs and its career opportunities   6. What is the purpose of the JPS command in Hadoop? The JPS command is used for testing the working of all the Hadoop daemons. It specifically tests daemons like NameNode, DataNode, ResourceManager, NodeManager and more. (In any Big Data interview, you’re likely to find one question on JPS and its importance.)   7. Name the different commands for starting up and shutting down Hadoop Daemons. This is one of the most important Big Data interview questions to help the interviewer gauge your knowledge of commands. To start all the daemons: ./sbin/start-all.sh To shut down all the daemons: ./sbin/stop-all.sh 8. Why do we need Hadoop for Big Data Analytics? This Hadoop interview questions test your awareness regarding the practical aspects of Big Data and Analytics. In most cases, Hadoop helps in exploring and analyzing large and unstructured data sets. Hadoop offers storage, processing and data collection capabilities that help in analytics. 9. Explain the different features of Hadoop. Listed in many Big Data Interview Questions and Answers, the best answer to this is – Open-Source – Hadoop is an open-sourced platform. It allows the code to be rewritten or modified according to user and analytics requirements. Scalability – Hadoop supports the addition of hardware resources to the new nodes. Data Recovery – Hadoop follows replication which allows the recovery of data in the case of any failure. Data Locality – This means that Hadoop moves the computation to the data and not the other way round. This way, the whole process speeds up. 10. Define the Port Numbers for NameNode, Task Tracker and Job Tracker. NameNode – Port 50070 Task Tracker – Port 50060 Job Tracker – Port 50030 11. What do you mean by indexing in HDFS? HDFS indexes data blocks based on their sizes. The end of a data block points to the address of where the next chunk of data blocks get stored. The DataNodes store the blocks of data while NameNode stores these data blocks. 12. What are Edge Nodes in Hadoop? This is one of the top big data analytics important questions which can also be asked as data engineer interview questions. Edge nodes refer to the gateway nodes which act as an interface between Hadoop cluster and the external network. These nodes run client applications and cluster management tools and are used as staging areas as well. Enterprise-class storage capabilities are required for Edge Nodes, and a single edge node usually suffices for multiple Hadoop clusters. 13. What are some of the data management tools used with Edge Nodes in Hadoop? This Big Data interview question aims to test your awareness regarding various tools and frameworks. Oozie, Ambari, Pig and Flume are the most common data management tools that work with Edge Nodes in Hadoop. 14. Explain the core methods of a Reducer. There are three core methods of a reducer. They are- setup() – This is used to configure different parameters like heap size, distributed cache and input data. reduce() – A parameter that is called once per key with the concerned reduce task cleanup() – Clears all temporary files and called only at the end of a reducer task. 15. Talk about the different tombstone markers used for deletion purposes in HBase. This Big Data interview question dives into your knowledge of HBase and its working. There are three main tombstone markers used for deletion in HBase. They are- Family Delete Marker – For marking all the columns of a column family. Version Delete Marker – For marking a single version of a single column. Column Delete Marker – For marking all the versions of a single column. 16. How can Big Data add value to businesses? One of the most common big data interview question. In the present scenario, Big Data is everything. If you have data, you have the most powerful tool at your disposal. Big Data Analytics helps businesses to transform raw data into meaningful and actionable insights that can shape their business strategies. The most important contribution of Big Data to business is data-driven business decisions. Big Data makes it possible for organizations to base their decisions on tangible information and insights. Furthermore, Predictive Analytics allows companies to craft customized recommendations and marketing strategies for different buyer personas. Together, Big Data tools and technologies help boost revenue, streamline business operations, increase productivity, and enhance customer satisfaction. In fact, anyone who’s not leveraging Big Data today is losing out on an ocean of opportunities.  17. How do you deploy a Big Data solution? You can deploy a Big Data solution in three steps: Data Ingestion – This is the first step in the deployment of a Big Data solution. You begin by collecting data from multiple sources, be it social media platforms, log files, business documents, anything relevant to your business. Data can either be extracted through real-time streaming or in batch jobs. Data Storage – Once the data is extracted, you must store the data in a database. It can be HDFS or HBase. While HDFS storage is perfect for sequential access, HBase is ideal for random read/write access. Data Processing – The last step in the deployment of the solution is data processing. Usually, data processing is done via frameworks like Hadoop, Spark, MapReduce, Flink, and Pig, to name a few.   18. How is NFS different from HDFS? The Network File System (NFS) is one of the oldest distributed file storage systems, while Hadoop Distributed File System (HDFS) came to the spotlight only recently after the upsurge of Big Data.  The table below highlights some of the most notable differences between NFS and HDFS: NFS It can both store and process small volumes of data.  The data is stored in dedicated hardware. In the case of system failure, you cannot access the data.  Since NFS runs on a single machine, there’s no chance for data redundancy. HDFS It is explicitly designed to store and process Big Data. Data is divided into data blocks that are distributed on the local drives of the hardware.  Data can be accessed even in the case of a system failure. HDFS runs on a cluster of machines, and hence, the replication protocol may lead to redundant data.   19. List the different file permissions in HDFS for files or directory levels. One of the common big data interview questions. The Hadoop distributed file system (HDFS) has specific permissions for files and directories. There are three user levels in HDFS – Owner, Group, and Others. For each of the user levels, there are three available permissions: read (r) write (w) execute(x). These three permissions work uniquely for files and directories. For files – The r permission is for reading a file The w permission is for writing a file. Although there’s an execute(x) permission, you cannot execute HDFS files. For directories – The r permission lists the contents of a specific directory. The w permission creates or deletes a directory. The X permission is for accessing a child directory.   20. Elaborate on the processes that overwrite the replication factors in HDFS. In HDFS, there are two ways to overwrite the replication factors – on file basis and on directory basis. On File Basis In this method, the replication factor changes according to the file using Hadoop FS shell. The following command is used for this: $hadoop fs – setrep –w2/my/test_file Here, test_file refers to the filename whose replication factor will be set to 2. On Directory Basis This method changes the replication factor according to the directory, as such, the replication factor for all the files under a particular directory, changes. The following command is used for this: $hadoop fs –setrep –w5/my/test_dir Here, test_dir refers to the name of the directory for which the replication factor and all the files contained within will be set to 5.   21. Name the three modes in which you can run Hadoop. One of the most common question in any big data interview. The three modes are: Standalone mode – This is Hadoop’s default mode that uses the local file system for both input and output operations. The main purpose of the standalone mode is debugging. It does not support HDFS and also lacks custom configuration required for mapred-site.xml, core-site.xml, and hdfs-site.xml files.  Pseudo-distributed mode – Also known as the single-node cluster, the pseudo-distributed mode includes both NameNode and DataNode within the same machine. In this mode, all the Hadoop daemons will run on a single node, and hence, the Master and Slave nodes are the same. Fully distributed mode – This mode is known as the multi-node cluster wherein multiple nodes function simultaneously to execute Hadoop jobs. Here, all the Hadoop daemons run on different nodes. So, the Master and Slave nodes run separately. 22. Explain “Overfitting.” Overfitting refers to a modeling error that occurs when a function is tightly fit (influenced) by a limited set of data points. Overfitting results in an overly complex model that makes it further difficult to explain the peculiarities or idiosyncrasies in the data at hand. As it adversely affects the generalization ability of the model, it becomes challenging to determine the predictive quotient of overfitted models. These models fail to perform when applied to external data (data that is not part of the sample data) or new datasets.  Overfitting is one of the most common problems in Machine Learning. A model is considered to be overfitted when it performs better on the training set but fails miserably on the test set. However, there are many methods to prevent the problem of overfitting, such as cross-validation, pruning, early stopping, regularization, and assembling. 23. What is Feature Selection? This is one of the popular Big Data analytics important questions which is also often featured as data engineer interview questions. Feature selection refers to the process of extracting only the required features from a specific dataset. When data is extracted from disparate sources, not all data is useful at all times – different business needs call for different data insights. This is where feature selection comes in to identify and select only those features that are relevant for a particular business requirement or stage of data processing. The main goal of feature selection is to simplify ML models to make their analysis and interpretation easier. Feature selection enhances the generalization abilities of a model and eliminates the problems of dimensionality, thereby, preventing the possibilities of overfitting. Thus, feature selection provides a better understanding of the data under study, improves the prediction performance of the model, and reduces the computation time significantly.  Feature selection can be done via three techniques: Filters method In this method, the features selected are not dependent on the designated classifiers. A variable ranking technique is used to select variables for ordering purposes. During the classification process, the variable ranking technique takes into consideration the importance and usefulness of a feature. The Chi-Square Test, Variance Threshold, and Information Gain are some examples of the filters method. Wrappers method In this method, the algorithm used for feature subset selection exists as a ‘wrapper’ around the induction algorithm. The induction algorithm functions like a ‘Black Box’ that produces a classifier that will be further used in the classification of features. The major drawback or limitation of the wrappers method is that to obtain the feature subset, you need to perform heavy computation work. Genetic Algorithms, Sequential Feature Selection, and Recursive Feature Elimination are examples of the wrappers method. Embedded method  The embedded method combines the best of both worlds – it includes the best features of the filters and wrappers methods. In this method, the variable selection is done during the training process, thereby allowing you to identify the features that are the most accurate for a given model. L1 Regularisation Technique and Ridge Regression are two popular examples of the embedded method.  24. Define “Outliers.” An outlier refers to a data point or an observation that lies at an abnormal distance from other values in a random sample. In other words, outliers are the values that are far removed from the group; they do not belong to any specific cluster or group in the dataset. The presence of outliers usually affects the behavior of the model – they can mislead the training process of ML algorithms. Some of the adverse impacts of outliers include longer training time, inaccurate models, and poor outcomes.  However, outliers may sometimes contain valuable information. This is why they must be investigated thoroughly and treated accordingly.  25. Name some outlier detection techniques. Again, one of the most important big data interview questions. Here are six outlier detection methods: Extreme Value Analysis – This method determines the statistical tails of the data distribution. Statistical methods like ‘z-scores’ on univariate data are a perfect example of extreme value analysis. Probabilistic and Statistical Models – This method determines the ‘unlikely instances’ from a ‘probabilistic model’ of data. A good example is the optimization of Gaussian mixture models using ‘expectation-maximization’. Linear Models – This method models the data into lower dimensions. Proximity-based Models – In this approach, the data instances that are isolated from the data group are determined by Cluster, Density, or by the Nearest Neighbor Analysis. Information-Theoretic Models – This approach seeks to detect outliers as the bad data instances that increase the complexity of the dataset. High-Dimensional Outlier Detection – This method identifies the subspaces for the outliers according to the distance measures in higher dimensions. 26. Explain Rack Awareness in Hadoop. Rack Awareness is one of the popular big data interview questions. Rach awareness is an algorithm that identifies and selects DataNodes closer to the NameNode based on their rack information. It is applied to the NameNode to determine how data blocks and their replicas will be placed. During the installation process, the default assumption is that all nodes belong to the same rack.   Rack awareness helps to: Improve data reliability and accessibility. Improve cluster performance. Improve network bandwidth.  Keep the bulk flow in-rack as and when possible. Prevent data loss in case of a complete rack failure. 27. Can you recover a NameNode when it is down? If so, how? Yes, it is possible to recover a NameNode when it is down. Here’s how you can do it: Use the FsImage (the file system metadata replica) to launch a new NameNode.  Configure DataNodes along with the clients so that they can acknowledge and refer to newly started NameNode. When the newly created NameNode completes loading the last checkpoint of the FsImage (that has now received enough block reports from the DataNodes) loading process, it will be ready to start serving the client.  However, the recovery process of a NameNode is feasible only for smaller clusters. For large Hadoop clusters, the recovery process usually consumes a substantial amount of time, thereby making it quite a challenging task.  28. Name the configuration parameters of a MapReduce framework. The configuration parameters in the MapReduce framework include: The input format of data. The output format of data. The input location of jobs in the distributed file system. The output location of jobs in the distributed file system. The class containing the map function The class containing the reduce function The JAR file containing the mapper, reducer, and driver classes. Learn: Mapreduce in big data Learn Online Software Development Courses online from the World’s top Universities. Earn Executive PG Programs, Advanced Certificate Programs or Masters Programs to fast-track your career. 29. What is a Distributed Cache? What are its benefits? Any Big Data Interview Question and Answers guide won’t complete without this question. Distributed cache in Hadoop is a service offered by the MapReduce framework used for caching files. If a file is cached for a specific job, Hadoop makes it available on individual DataNodes both in memory and in system where the map and reduce tasks are simultaneously executing. This allows you to quickly access and read cached files to populate any collection (like arrays, hashmaps, etc.) in a code. Distributed cache offers the following benefits: It distributes simple, read-only text/data files and other complex types like jars, archives, etc.  It tracks the modification timestamps of cache files which highlight the files that should not be modified until a job is executed successfully. 30. What is a SequenceFile in Hadoop? In Hadoop, a SequenceFile is a flat-file that contains binary key-value pairs. It is most commonly used in MapReduce I/O formats. The map outputs are stored internally as a SequenceFile which provides the reader, writer, and sorter classes.  There are three SequenceFile formats: Uncompressed key-value records Record compressed key-value records (only ‘values’ are compressed). Block compressed key-value records (here, both keys and values are collected in ‘blocks’ separately and then compressed).    31. Explain the role of a JobTracker. One of the common big data interview questions. The primary function of the JobTracker is resource management, which essentially means managing the TaskTrackers. Apart from this, JobTracker also tracks resource availability and handles task life cycle management (track the progress of tasks and their fault tolerance). Some crucial features of the JobTracker are: It is a process that runs on a separate node (not on a DataNode). It communicates with the NameNode to identify data location. It tracks the execution of MapReduce workloads. It allocates TaskTracker nodes based on the available slots. It monitors each TaskTracker and submits the overall job report to the client. It finds the best TaskTracker nodes to execute specific tasks on particular nodes.   32. Name the common input formats in Hadoop. Hadoop has three common input formats: Text Input Format – This is the default input format in Hadoop. Sequence File Input Format – This input format is used to read files in a sequence. Key-Value Input Format – This input format is used for plain text files (files broken into lines).   33. What is the need for Data Locality in Hadoop? One of the important big data interview questions. In HDFS, datasets are stored as blocks in DataNodes in the Hadoop cluster. When a  MapReduce job is executing, the individual Mapper processes the data blocks (Input Splits). If the data does is not present in the same node where the Mapper executes the job, the data must be copied from the DataNode where it resides over the network to the Mapper DataNode.  When a MapReduce job has over a hundred Mappers and each Mapper DataNode tries to copy the data from another DataNode in the cluster simultaneously, it will lead to network congestion, thereby having a negative impact on the system’s overall performance. This is where Data Locality enters the scenario. Instead of moving a large chunk of data to the computation, Data Locality moves the data computation close to where the actual data resides on the DataNode. This helps improve the overall performance of the system, without causing unnecessary delay.    34. What are the steps to achieve security in Hadoop? In Hadoop, Kerberos – a network authentication protocol – is used to achieve security. Kerberos is designed to offer robust authentication for client/server applications via secret-key cryptography.  When you use Kerberos to access a service, you have to undergo three steps, each of which involves a message exchange with a server. The steps are as follows: Authentication – This is the first step wherein the client is authenticated via the authentication server, after which a time-stamped TGT (Ticket Granting Ticket) is given to the client. Authorization – In the second step, the client uses the TGT for requesting a service ticket from the TGS (Ticket Granting Server). Service Request – In the final step, the client uses the service ticket to authenticate themselves to the server.    35. How can you handle missing values in Big Data? The final question in our big data interview questions and answers guide. Missing values refer to the values that are not present in a column. It occurs when there’s is no data value for a variable in an observation. If missing values are not handled properly, it is bound to lead to erroneous data which in turn will generate incorrect outcomes. Thus, it is highly recommended to treat missing values correctly before processing the datasets. Usually, if the number of missing values is small, the data is dropped, but if there’s a bulk of missing values, data imputation is the preferred course of action.  In Statistics, there are different ways to estimate the missing values. These include regression, multiple data imputation, listwise/pairwise deletion, maximum likelihood estimation, and approximate Bayesian bootstrap.   As the amount of data continues to grow exponentially, the need for skilled professionals who can harness its potential becomes increasingly crucial. By understanding the concepts, tools, and challenges associated with Big Data, you are better equipped to navigate the vast opportunities and make data-driven decisions in today's data-driven world. Thank you for reading, and we wish you success in your Big Data journey.   ItBots.in wishes you all the best!  

  • Sumasri Sumasri
UI/UX Interview Question With Answer
May 12, 2023
UI/UX Interview Question With Answer

In today's digital age, UI/UX design has become an essential part of creating successful websites, applications, and software. As a UI/UX designer, your primary responsibility is to create user-centered designs that are visually appealing, easy to navigate, and enhance user experience. In this post, we will explore a common interview question about UI/UX design and provide an insightful answer to help you prepare for your next UI/UX interview.   1. What do you understand by UI (user interface)? A user interface is the point of interaction between humans and computers. Designing a user interface is how the interface will be presented and visible to the end users and how they behave once the user starts using it. For example, if we want to create a mobile app for booking flights, we must have a screen to navigate to look for different options, place filters, fill forms, login, register, make payments, and other options. All this is a part of the user interface.terface)? 2. What are the different elements of the User interface? This is one of the most frequently asked UI Design interview questions and answers for freshers. A perfect and complete UI comes with different elements or components.      Input controls- are the interactive elements allowing users to input information, such as checkboxes, text boxes, text fields, drop downs, and others.      Navigational elements- such elements allow the user to navigate through the interface, whether mobile or desktop. These are important for completing a specific task. Some commonly used components are- search fields, sliders, menus, and others.      Informational components- such components help communicate important information to the end user. For example, message box, notification, and progress bar.      Containers- these components help group the related content into individual and meaningful groups. We can place several elements within a container, for example- the accordion menu.  UI design aims to check how these elements will look together and how we can arrange them to offer the end users an exceptional look and feel. UI design covers-      Interactivity- lets us check how the interface and all elements behave and function together. For example, if a user clicks on the button, it must perform the desired action only.      Visual design- defines how the interface will look, considering factors like color, font, icon design, and space. We can also use various plugins to improve the design of any website or app.      Information architecture- allows us to organize and label the content within the user interface.  It is necessary that we design the user interface properly to provide an excellent user experience.   3. What do you mean by UX (user experience)? User experience is beyond the user interface. The user experience refers to the holistic journey of the user that they experience while accessing or using any product. It considers how the user interacts with the product or app and how it provides value, ensuring a smooth task-completion process. User experience is calculated from the user’s perspective, which means how a user feels while working on any app. For example, how easily they can look for specific products on any app, how smooth is the payment process, how the app functionality is working, how fast the app is, and others.   4. What are the core responsibilities of a UI designer? A UI designer is responsible for various things, especially how an interface looks and is visible to the end users. This process comes with several tasks that are important to understand. A few of them are -      Gathering and evaluating requirements from users who collaborate with managers and engineers.      Explore innovative design ideas leveraging next-gen technologies, such as storyboards, process flows, and sitemaps.      Should be able to design graphic user interfaces elements, like menus, tabs, and widgets      Have a better understanding of building page navigation buttons and search fields      Know how to develop UI mockups and prototypes to explain how sites function and look.      Create original graphic designs.      Work on rough drafts to explain the work to the internal teams and key stakeholders.      Able to identify and troubleshoot UX problems (e.g., responsiveness).      Ability to conduct layout adjustments based on user feedback.  5. What skills a UI designer must possess? Below are the most critical job-specific UI design skills-      They must know about wireframing and prototyping.      Must have basic knowledge of fundamental design principles, like typography and colour theory.      Must work with market-standard tools like Sketch, Adobe XD, Figma, and others.      Knows how to deal with the proper implementation of UX concepts.      Knows how to interact with design principles.      You must know about information architecture.    6. What skills a UI designer must possess? Parameters to consider while planning a design layout. This question will help you to envision your thought process and understand your design ability. This question will allow you to showcase your approach to a foundational design task while displaying your conceptual knowledge in a hands-on scenario. Designing a seamless layout will present information allowing users to achieve their goals.  To design a practical layout, we must understand which key parameters to consider, such as information hierarchy, the size and type of device to access the product, and how users will interact with the app. Apart from this, we need to consider default layouts to reduce friction. A design checklist helps in optimizing the layout by attaining attention. Some important parameters are-  Typography- it improves the app’s readability. For this, we can consider- height, uppercase tracking, font style, font weight, text contrast, and others.  Spacing and margins help clarify the relationship between UI elements and prevent the content from overwhelming the page.  Imagery and colour- a decent yet attractive look is key to every business’s success as it drives most of the traffic and helps recognize the brand.  UI elements- it is essential that what UI elements we use on the page are device responsive, can display well on every screen size and orientation, and interact well as expected.    7. Why your business website or application must have UI/UX? Expect to come across these important UI designer interview questions for freshers question in your next interviews. Any business struggling to create a strong presence must leverage the power of UI/UX to attract potential customers. UI/UX is a core part of any website or application design process. If we enhance this aspect, we will see an instant surge in traffic, and the business will move towards achieving its goals. So to retain potential customers and improve profits, we must use UI/UX, as it will bring many benefits to the business. Brand loyalty- implementing innovative and advanced UI/UX design can help to satisfy customers and create a solid relationship between them. Once the customers feel comfortable, they will become loyal to the business. Consistency- maintaining the consistency of the brand is essential. As UI designers, we must come up with new innovative ideas that can help bring more customers with great ease. Customer satisfaction- a great UI/UX design help satisfy potential customers that keep them engaging with easily navigable content and apps.   8. Explain the benefits of implementing UI/UX in your business. Below are several benefits that will influence you to hire a great UI/UX designer for your business.      Customer retainment- when we curate the UI design well, it will retain the customers for a longer time. The business will experience a low bounce rate and improved brand royalty. One famous example is Facebook which has leveraged the power of UI to increase its users.      An exceptional UI/UX design helps in boosting brand identity and credibility. Not only this, it helps businesses to build strong and long relationships with customers.      An interactive and seamless UI design will also attract new customers to businesses more likely to convert if they land on the product page.      Businesses can raise ROI by creating a smooth workflow for customers if a website or app has an intuitive UI/UX design. They will enjoy seamless experiences working on pertinent matters without any performance issues.      A good UI/UX design will encourage customers to return to the site for more experiences and improves app time. Additionally, the UI/UX of landing pages significantly boost the website's conversion rates, reflecting the website's first impression.      With structured UI/UI design, the website will be SEO-optimized, improve its ranking, and gain more visitors' attention.      If the UI of an app or website is simple yet attractive, it will also support the website's speed by loading it faster and reducing the load time. 9. What do you mean by design thinking? A must-know for anyone looking to prepare for UI Design advanced interview questions, this is one of the frequent questions asked of content managers. Design thinking is finding the potential issues that need to be resolved first. It requires us to understand the end users and how they think, bring new ideas to the table iteratively, make assumptions, and redefine the original problem.  The main concern of design thinking is to find a possible alternative solution. Below are the different stages of design thinking- empathize, define, ideate, prototype, and evaluate.      Empathize: allows us to empathically understand the problem by experts observing people’s experiences to empathize with them fully.      Define: includes combining the gathered information and analyzing it to define the main problem.      Ideate: it marks the evolution of new ideas while keeping the user’s needs in mind.      Prototype: where the design team comes up with scaled-down versions of the product to check if the solutions work.      Test: the team tests the product and the features with the best possible solutions identified in the previous stage.    10. Why is research necessary in UX design? This is one of the most frequently asked UI Design interview questions and answers for freshers. Before moving to the design part, UX designers must research to find solutions to real-world problems. It includes gathering valuable insights from real users to understand their potential problems and how we can solve them by designing and developing the right solution.  Incorporating UX research throughout the design process helps businesses make more accurate, informed, unbiased decisions and validate design ideas. You can conduct quantitative and qualittative research.  Quantitative research is primarily exploratory research and is used to quantify the problem by way of generating numerical data or data that can be transformed into usable statistics, such as online surveys, paper surveys, mobile surveys and kiosk surveys, longitudinal studies, website interceptors, online polls, and systematic observations.  Qualitative user research is a direct assessment of behavior based on observation, such as contextual observation, ethnographic studies, interviews, field studies, and moderated usability tests.  Here are some practical ways to conduct the most common UX research.      User personas: a semi-fictional representation of potential and targeted users. It helps the UX designers create possible solutions keeping a specific target user in mind for better results.      User interviews are easy to gather helpful user data, discover why they are facing a specific issue, and understand how we can develop a particular UX design to meet their needs.      Focus groups: a moderated discussion with a specific group to gather insights, such as their attitudes, beliefs, needs, and perceptions about a new product the business will launch.      Surveys: include a set of questions sent explicitly to a targeted group to understand their attitudes and preferences.    11. Why is research necessary in UI design? During the UI design process, research must be the first step to ensure that the UI is created by keeping the user’s expectations in mind.  The UI design process starts after the UX part has been defined; UI designers must collaborate closely with UX designers and product managers to work on the gathered user research results. It will help to know the target audience and design the project.  UI designers must also identify other vital parameters, such as color palettes, structure, fonts, and other visual components that would improve the design and help customers to navigate smoothly. The best way to gather insights is to do competitor benchmarking, which will help us to learn what UI components they have used and how they work better than others.   12. What are the possible skills of a UI/UX designer? Below are the minimum skills that a UI/UX designer must have.      Must be able to make edits to the page using different tools like InVision, Adobe Photoshop, Adobe Illustrator, Sketch, and others      Detailed knowledge of common coding languages like HTML, XML, JavaScript, and others      well-skilled in using wireframe tasks and tools      Have an understanding of design trends and tools      Able to create low fidelity, medium and high fidelity prototype   13. What are the possible skills of a UI/UX developer? Below are the minimum skills that a UI/UX developer must have.      Detailed knowledge of programming languages like JavaScript, HTML, CSS, and others.      Well-skilled in application languages such as Ruby, PHP, Java, XHTML, Dot Net, Ajax, and others.      Must know how to work around tools like Flash, Photoshop, and Adobe Illustrator.      Basic knowledge of Restful APIs of social networking websites.      Experience with CMS like WordPress, Magento, Joomla, WooCommerce, and others.      Well, aware of basic concepts of SEO.  14. Explain the difference between UI and UX designers. UI and UX designers might have the same philosophy, but their practical application is very different in the marketplace. The primary points that make both UX and UI different are as follow.      UX is concerned with the product’s purpose and functionality, while UI deals with the quality of the interaction between the end user and the product.      UI design has an artistic component as it considers if the design and interface of the product are as expected by the customers. While in contrast, the UX is a significant component of market research that allows communicating with clients to understand their needs.      UX deals with project management and analysis leveraging the design thinking process that includes ideation, development, and delivery. UI is related to the technical component to generate the design components for the finished product. 15. Explain prototyping in UI/UX. Prototyping is the process where the design teams develop new ideas, experiment with them, bring those concepts to life, and convert them into digital designs. A prototype is an early sample of a design allowing potential users to interact with it before the final product is developed and launched. As per the design thinking process, the prototyping process is followed by usability testing. One of the best things about prototypes is that they are created without a single line of code using prototyping tools, allowing designers to link together artboards and create an interactive, clickable model without actual coding, with less investment cost. It is a smart way to test prototypes with users and stakeholders to understand their reactions and make changes without developing the whole app. We can use prototyping at various stages of the design process, helping validate ideas at any stage.   16. Mention different types of prototyping. Depending on the method and technique, there could be different types of prototyping, such as low, medium, and high fidelity. Here, fidelity refers to the level of detail and functionality of the created prototype.      Low-fidelity prototypes- also known as paper prototypes, are the quickest way to create prototypes with the least effort required. They represent a simple, incomplete product version but are efficient in testing high-level concepts before making the actual investment in developing the app.  While creating this prototype, we can gather feedback and test concepts early in the design process. Also, making changes to this type of prototype is more accessible than jumping into digital wireframes.      Medium-fidelity prototypes- are the next level of prototyping, also known as wireframes, that are created in greyscale. Such design contains only the user flows and information architecture without including the branding elements, photos, and logos.  It significantly focuses on the fundamental aspects of the design without being distracted by colors, photo placement, and logos. Using this prototype, the designer tests the core usability of the product before including other elements of the product.      High-fidelity prototypes- It allows the team to invest time in rendering the design in high fidelity. The designer starts including all the branding, photos, copy, colors, and animations to provide the final app-like design for testing. It is always essential to test high-fidelity prototypes before the actual development phase.    17. Explain the process for website prototyping. A common and most important UI Design question for interview, don't miss this one. After gathering all the meaningful insights about the potential customer and understanding what they expect from the product, we can seamlessly curate a prototyping process.      Select the features to test on users. It is impossible to test all product features in a single session effectively. Therefore, pinpoint the key features so we can test them in the later session.      Next, create a prototype for the website to test the selected key features and flows. Creating a prototype to test all features requires time and effort, which can be unnecessary. Instead, create a prototype highlighting the key features to test.      The next step is to present the design to users and stakeholders. Analyze their interaction with the product to see their behavior and experience. It helps in finding the usability issues in the current design.      After the testing session, analyze feedback into critical takeaways and update the designs as per their reactions and feedback.      Repeat the process until the customers get what they are looking for. It might take several iterations to reach the perfect solution.  18. What are the benefits of low-fidelity prototypes? Below are the significant benefits-      These are easy and fast to create and are essential for brainstorming various ideas and concepts.      Making changes to them is super easy.      These are cheaper options in terms of effort, investment, and resources required.      It is considered a great team-building exercise, resulting in increased involvement and ownership.      It allows team members to share their ideas while creating prototypes   19. What are the benefits of medium-fidelity prototypes? Below are the significant benefits-      As these prototypes are more accurate, they provide realistic experiences to the users. It will help in getting more accurate feedback.      It allows for faster iteration than adjusting a high-fidelity product.      It provides a great way to test an idea before investing much in development.    20. What are the benefits of high-fidelity prototypes? Below are the significant benefits-      These actual product prototypes provide near-real customer experience and impact feedback.      It provides a fantastic way to test your final product before entering the development phase.      It improves team collaboration with developers, giving them a clearer idea of how the product should behave.    21. Name some prototyping tools for UI/UX designers. For creating an impactive prototype website, we must use the right tool for better results and an easy prototype design process. Some commonly used tools are-      Figma      InVision Studio      Adobe XD      Webflow      Axure RP      Origami Studio      Justinmind      Sketch      Fluid UI      And more.    22. How can you improve the prototyping workflow? To help streamline and speed up the prototype creation workflow, we can use the following tips and tricks.      We must use the master components for fast-tracking the prototype connections.      Use components for scrolling content.      For simulating the delays, we can use the time delays and overlays.      We can use the observation mode.      We must focus on user scenarios.      We must have the right set of users for testing.      Must use the right tool for prototyping.    23. Explain the concept of universal design. Universal design is a set of recommendations specifically created to ensure that a product or service works for every type of customer with varying physical and mental abilities. A design is considered “universal” when anyone can use a product without any other adaptation or modification.  Universal design benefits users and businesses, resulting in higher user accessibility and satisfaction and better user retention.  For example- curb cuts.  Universal design tells us that if we create products that are a pleasure to use for people with all kinds of disabilities, we will improve the experience of those who don’t. Not every assistive technology or design accommodation we add will “breakthrough” to the larger, non-disabled community like curb cuts.    24. What are the misconceptions about universal designs? As it seems like a simple idea, it is generally misunderstood by many. The top three misconceptions are-      Universal design and accessible design are the same thing. But there is a difference. Accessible design allows users with disabilities to properly access a product or service that is just a component of universal design.      The universal design focuses only on functionality.      Universal design is a nice add-on to a design approach. it is not a guideline but a set of principles that anyone can integrate into the process from the beginning to ensure that everyone on a team shares the same universal design philosophy.   25. Mention some UX-related publications that you read. Below are some magazines.      UX Magazine      UXer Talks      Smashing Magazine      Awwwards      Design Shack   26. Explain the recent UI project that you worked on. What was your design process, and how can you justify your decisions? This, along with other interview questions on UI Design, is a regular feature in UI Design interviews, be ready to tackle it with an approach mentioned below. As you are facing a UI designer interview, you must be able to speak with confidence and explain your portfolio. If you have not worked on many projects, it doesn’t matter, you only have to keep your portfolio updated.  Make sure to be prepared for some heavy skilled questions, like what was your design process for a specific process. They just try to understand your way of working, your approach to the designing phase, why you made that decision, how you tested each component, and validate your answers with facts and numbers. Also, make sure to reflect on your positive approach to doing work.  If the interviewer is happy about how you have prepared everything, your chances of getting selected will improve.    27. What you must know about the UX before diving into the designing process? This is an important part for every UI designer to know about UX (user experience). As per the design thinking approach, that says “build the right thing, and build the thing right.” it means we have to make sure that the product we are creating is needed by the end users or customers. Then we must ensure that we design it in such a way that people like it.  For the first part, we must research the market, test our product among real customers, gather analytics, understand their behaviour, and needs, and then start with the design process. Without understanding the user experience, we cannot have a basic design in mind that can fit potential customers’ expectations.  It is always recommended to design the product around what the users want and need.  Three stages of design are-      Research — Analyze what your users want (“build the right product”).      Design — refers to building the product right.      User Testing — Confirm your results with real users to understand what to change.    28. Why you must conduct usability testing? There are several benefits of conducting usability testing.      It will help us to get the actual feedback direct from the target audience to make the required changes.      It will help us solve internal debates by testing different issues to see how users react to different opinions.      It helps us in highlighting the potential issues and problems before the launch of the product.      it increases the likelihood of usage and repeat usage.      It helps in minimizing the risk of the product failing.   29. What is the biggest challenge for a UI designer? There could be several challenges that a team of designers may face.      Lack of time to complete the project. For that they must have an effective strategy, efficient tools, and others.      Lack of target audience knowledge. So do research to find out what customers want and what competitors have to offer.      Lack of understanding of customers expect from our product, means what are their pain points and how can we solve them.      Less user feedback, not enough to conduct testing and analyze the results.      The complexity of product, so customer needs help to understand.    30. Where do find designing inspiration? What they really mean to ask here- Are you a passionate learner?  Interviewers look for a couple of things when they ask you this type of question. First, they want to know if we are genuinely interested in the industry. Second, they want to know that you are aware of the latest trends and understand how to implement them. Third, they want to know if we are eager to learn and improve.  There’s no right or wrong answer here.  You could discuss a design book you have gone through recently and start discussing what’s new and explain your perspective. Also, point out what you have learned. You could also talk about any UX podcast you listen to, or a trend you about design blog. How could you follow that trend and contribute to this company’s success?    We hope that our answer to the common UI/UX interview question has provided you with a better understanding of the difference between UI and UX design. As a UI/UX designer, it's important to recognize the importance of both UI and UX design in creating successful products. By designing a visually appealing interface that is intuitive to use and provides an excellent user experience, you can help create a product that users will love. We wish you the best of luck in your UI/UX design endeavors and hope this post has been helpful in your preparation for your next UI/UX interview.

  • Sumasri Sumasri
Azure DevOps Interview Questions With Answers
Apr 20, 2023
Azure DevOps Interview Questions With Answers

As technology continues to advance at an unprecedented pace, organizations must adapt to keep up with the rapidly changing landscape. One of the most significant changes in recent years has been the adoption of DevOps, a methodology that emphasizes collaboration and automation between software development and IT operations teams. Whether you are a developer, operations professional, or business leader, understanding DevOps is critical to staying competitive in today's fast-paced digital world.  We have prepared a collection of questions to be asked in the interview which can help you with the preparation.   1) What is DevOps? DevOps is Development and Operation Collaboration, it’s a Union of 3Ps – Process, People and Product (working Product) that enable continuous integration and continuous delivery of value to our end users. DevOps accelerate the process to deliver applications and software services at high speed and high velocity. So that organization can learn and adapt to the market at its earliest. Also, it minimises the risk factor by continuously delivering and getting end users' and stakeholders' feedback at the early stages.   2) What is the need for DevOps? In Traditional software development, after completing the development part, the code deployment time was huge. And many times, we heard the common fights between the Development Team and Operations Team or deployment team that it works fine on our system, it’s the server causing problems and operation team defences it’s not your server it’s your code, Right? Well, DevOps solves the Traditional Dev and Ops fights by breaking the wall of confusion.   3) How DevOps Works? DevOps is the practice of operations and development engineers that work together in the entire project lifecycle, from the design and development process to product releases and support. Starting from design and development to testing automation and from continuous integration to continuous delivery, the team works together to achieve the desired goal. People having both development and operations skill sets work together and use various tools for CI-CD and Monitoring to respond quickly to customers’ needs and fix issues and bugs.   4) What are the benefits of DevOps? The main benefits of implementing DevOps are: 1. Customer Satisfaction. 2. More engaged and Collaborative Development and Operation teams. 3.DevOps Deploy code faster in the market through Continuous Integration and Continuous Delivery. 4. Faster Operational Support. 5. Strong Infrastructure Performance and IT performance. 6. Fewer failures and continuous improvement. 7. Transparency between the team. 8. Constant Monitoring and better adaption. 9. Increase efficiency   5) What are the DevOps tools? To Implement DevOps, Automation plays a major role and we defiantly need some tools for Implementation. The following are the major areas: 1. Planning 2. Code management 3. Build and Testing 4. Release management 5. Deploy and Monitor 6. Here’s a list of tools that can help you meet your DevOps requirement perfectly.   6) Which tools are useful for Continuous Integration? Azure Pipelines has support for all the platforms like Linux, macOS, and Windows also we can consider the following tools for Continuous Integration. 1. Jenkins 2.TeamCity 3. Travis CI 4. Bamboo 5.GitLab CI 6.CircleCI 7. Codeship   7) Which tools are useful for Continuous Deployment? Following are a few useful Continuous Deployment tools 1. Azure Pipelines for Deployment. 2. Jenkins. 3.TeamCity. 4. Bamboo. 5.ElectricFlow. 6. Octopus Deploy. 7. AWS CodeDeploy. 8.DeployBot. 9. Shippable.   8) What is InfrastructureConfiguration Which tools are useful for InfrastructureConfiguration? In today’s fast and competitive market, many companies demand a faster deployment process and Infrastructure Configuration, so treating Infrastructure as software and managing the processes such as version control, continuous integration, deployment and automated testing will make infrastructure changes more rapidly and reliably. The following are the most popular tools for Infrastructure Configuration. 1. Chef 2. Puppet 3. Ansible   9) What is Continuous Testing? What is the use of Test Automation in DevOps? DevOps is not about jobs or tools, it’s about people, culture and automation. and to implement DevOps, continuous testing plays a very important role where writing scripts for software testing and making it auto executable so that we can automate the testing and do the frequent releases using the delivery pipelines. We have to write unit testing to achieve Continuous Testing.   10) Which tools are useful for Continuous Testing? For test Automation there are many open-source tools available, following are a few names 1. Selenium 2.JMeter 2.JUnit 3. AntUnit 4. Cucumber 5.SoapUI 6. Tricentis Tosca   11) What is Continuous Monitoring? DevOps and Agile are all about inspection and adaptation to make continuous improvements in our process, and for that, we must have to monitor continuously the process, application performance and infrastructures. By doing continuous infatuation monitoring, we can visualize the process and get early alerts in real time. By analyzing that data, we can take decision wisely and adapt the things and process that best suits the business.   12) Which tools are useful for Continuous Monitoring? For continuous monitoring, Nagios, SysDig and Zabbix are the famous open-source tools available in the market. Infrastructure as code(laC) vendors like Amazon and Google have tools like AWS CloudWatch and StackDriver. Also, New Relic is a good option for continuous monitoring.   13) What is the container and What containers does Azure DevOps support? The container will provide a way to package your software code, its configurations, Packages and its dependencies into a single unit or object. We can have multiple containers that can run on the same machine and share the operating system with other containers so that we can run anywhere with fast and reliable and consistent deployments. Azure DevOps has the following container support. 1. Docker 2.Asp.Net with containers. 3. Azure Kubernetes services. Azure Service Fabric application with Docker support.   14) What is Azure DevOps? What is the difference between Azure DevOps and VSTS Online? Microsoft Visual Studio Team Services, now known as Azure DevOps has an excellent application lifecycle management tool. We can plan a project with Agile tools and templates, manage and run test plans, Version control source code and manage the branches, and deploy the solution across all platforms using Azure Pipelines, by implementing Continuous Instigation and Continuous Deployment.   15) What services does Azure DevOps Provide? Azure DevOps provides full application lifecycle management from planning to coding, and from testing to build and deployment.   16) List some famous tools of DevOps?     Jenkin     Travis CI     Bamboo     Hudson     TeamCity     CircleCI     JIRA     Slack     Zoom     Clarizen     Asana     SVN     Git     Bitbucket     GitHub   17) Mention various phases of DevOps? The given below are the different phases of DevOps Plan: the plan is essential for any application which requires development, preparing a plan for the process of development is the best practice. Code: The code of the application is designed according to the needs of users. Build: with the help of different codes that are generated in earlier steps, the build of the application is created. Test: Test plays an essential role in the development of the It application, which helps to test the application and rebuild the application when required. Integrate: It is used to collaborate the various codes, which are from multiple programmers. Deploy: It helps for future use by forming the environment of the cloud from the deployed codes, and it maintains continuous functioning even though the new changes take place in the website with high traffic. Operate: When it is necessary operations take place on code. Monitor: For customer needs, the performance of the application is monitored.   18) What are the advantages of Azure DevOps? The given below are some important advantages of the Azure DevOps     It delivers the software continuously.     It simply solves complex problems.     It identifies problems quickly and solves them with high speed.     It is also used for quick features transport.     It maintains a secure operating environment.     It is used to develop the collaboration of the various teams.   19) Describe Azure DevOps? It is a new version of Microsoft VSTS, it is used for project planning by using the templates and the tools of Azure. Its functionality helps to manage and run the plans of the test, it is also used for the solution deployment through various platforms to leverage the pipelines. It provides CI and CD quick deployment.   20) Define Azure boards? It is a DevOps service which is used to manage the projects of software, It offers various sets of abilities like dashboards, reporting, scrum and kanban. Its essential feature contains queries, backlogs, sprints, dashboards and work items.   21) Describe Azure repos? It is a system version control which is used for code management and various versions by using the lifecycle of the development. It is also used to track the changes for the code through various teams, the clear list of changes may be used for coordination between teams and collaboration of the changes for future use. One of its essential features of it is centralized version control and distributed version control. Git is an example of distributed version control, and TFVC is an example of centralized version control.   22) Explain Azure pipelines? It is one of the essential Azure cloud services, with which we can build and test the project's code automatically. It works productively with the help of major languages and types of the project, it shares that project code with other customers also.   23) Explain the test plans of Azure? They are Azure DevOps services which offer solutions for test management, it offers essential abilities, exploratory testing, customer testing, and planned testing manually. It maintains an extensive browser, which offers testing exploration along with stakeholders' feedback storage. Essential techniques like testing exploration and manuals are required for product development, they are the reason for testing automation.   24) Mention some important components of Azure DevOps integration and the bit bucket? The answer to this question represents the relation between hosted agent and the service of external Git, its continuous integration and continuous deployment are congruent through Github and the server of Git such as bit bucket. Instead of transforming the complete Gitlab project, it is used for external respiratory connection to get the advantages of its continuous integration and continuous development.   25) Describe the projects of Azure DevOps? Project of the azure devops is an essential choice for gaining experience, which helped for code existence and Git repository to design the continuous delivery and integration pipelines of Azure DevOps.   26) Mention the services provided by Azure DevOps? It offers the complete lifecycle management of applications, that is from plan to code, and also from test to build and deployment.   27) Describe continuous monitoring? For simultaneous development of our process, agile and DevOps are used by adopting expectations. We need to monitor the constant progress and the infrastructure, with the monitoring of simultaneous infatuation, we can do process visualization to gain quick alerts in real-time. With the help of data analysis, we can select the process which suits our organization.   28) List Out some useful tools for continuous monitoring?     Lansweeper     Spiceworks     Snort     SolarWinds     Nagios     Tenable     Ipswitch WhatsUp Gold     Paessler PRTG     Rapid7 Insight     Cisco Identity Services Engine   29) Name the web application which can be deployed with Azure? The given below are the web applications, that can be deployed with Azure     ASP.NET     PHP     WCF   30) Mention the service used to manage the Azure resources. The Azure resource manager is the one for resource management, that contains various services like deployment, management etc.   31) What features does Azure DevOps provide? Azure DevOps provides many integrated features that you can use based on your project requirement. You can access these features directly in the browser or IDE.     Azure Boards to manage the PBIs and Tasks.     Azure Pipelines for the automation of build pipelines and releases.     Azure Repos allows you to manage your code versions.     Azure Test Plans to manage the Test artefacts.     Azure Artifacts manages the public and private package feeds.     Azure OnePlan provides the capability for enhanced visibility and alignment of the team working on the project.   32) What are Azure DevOps Services? Azure DevOps provides different services:     Azure Boards     Azure Pipelines     Azure Repos     Azure Test Plans     Azure Artifacts     Extensions Marketplace   33) What are Azure DevOps Boards? Azure Boards is a service to manage software projects. You can easily track features, stories, tasks and bugs associated with your projects. It provides capabilities including reporting, dashboards, and support for Scrum and Kanban. You can plan, discuss and track work across the teams. For more visit Azure Boards   34) What is the Azure DevOps Pipeline? Azure DevOps Pipeline performs the build and testing of any type of project with any programming language to make them available to other targets. Azure Pipeline is an automated combination of Continuous Integration and Continuous Delivery to build, test the code project and ship it to the deployment target.   35) What different ways does Azure DevOps offer to define pipelines? You should have a basic understanding of key concepts such as triggers, stages, tasks, task groups, variables, and variable groups, and build artefacts to create a release pipeline. Azure DevOps offers two ways to define pipelines: Using YAML Syntax – Here you can use a YAML file to create the pipeline that you can version with the rest of the code. The YAML file ‘azure-pipeline.yml’ contains all the code changes to build and deploy your infrastructure and application. You can also use YAML Editor in the Azure DevOps portal to create your pipeline. Using Classic Interface – Azure DevOps offers the capability to create releases using highly configurable and manageable pipelines by Classic User Interface. You can create releases to multiple stages with required approvals and checks using these pipelines. For more visit Define Classic Pipeline.   36) What is a Multi-stage Pipeline? Multi-stage Pipeline allows you to define CI, CD or both in your single YAML pipeline code. It offers some benefits such as being easy to maintain, you can easily check which stage your deployment is currently in, and many more. For more about Multi-stage pipeline visit Multi-stage Pipeline Azure DevOps.   37) Why should you use Azure DevOps Pipelines? Azure pipelines come with many benefits: Provides the ability to work with any language or platform Provides integration with GitHub Can configure Open-Source Projects Has the ability to deploy on different types of targets at the same time Has an integration with Azure Deployments Provide build on Linux, Windows and Mac Machines   38) What is Release in Azure DevOps? Releases or Release Pipelines allow you to continuously deliver your software to customers at a faster rate with lower risk. Release pipelines provide the capability to fully automate the testing and delivery of your software in multiple stages before production. You can control these automated ways by approvals or on-demand deployments. Azure DevOps allows you to create release pipelines by navigating to Releases in Pipeline Menu. Once you click on ‘New’ then ‘New Release Pipeline’, It will navigate you to the new release pipeline page where you can specify Build Artifacts, Stages, Pre-deployment conditions, Variables and other Deployment options.   39) Explain variable and variable groups in Azure DevOps. Variables allow you to store some data that can be used across pipelines. All variables are mutable and stored as strings. Variable Groups provide the ability to use variables across multiple pipelines. You can store secrets in variable or variable groups.   40) What are Azure DevOps artefacts? Azure Artifacts allows you to create and share npm, NuGet and Maven package feeds from private and public sources with a team. Azure artefacts can manage all types of packages like npm, NuGet, Maven etc. You can easily add fully integrated Package management to your Continuous Integration/Continuous Delivery CI/CD pipelines with a single click or via ARM functionality. For more about Azure Artifacts visit Azure Artifacts.   41) What are Azure DevOps Test Plans? Azure Test Plans is a planned and exploratory testing solution to improve code quality and provides three types of test management artefacts -test plans, test suites and test cases in the Azure DevOps server. For more about Azure Test Plans, you can refer to Azure Test Plans.   42) What are Azure DevOps Repos? Azure Repos is a set of version control tools by Azure DevOps. Azure Repos are used to manage the code. It provides an unlimited number of private repositories, pulls requests and code searches for your projects. You can create a branch as per your requirement and can push the code from any IDE, GIT client or editor. Azure repos support two types of version control as below. Git – is a distributed version control system and is most widely used. TFVC – Team Foundation Version Control – a centralized version control   43) What is Pull Request in Azure DevOps Repos? Pull requests are used to review and merge code to a Git project. Pull requests allow your team to review your code and provide feedback on your code. Pull requests can come from either feature or topic branches in the same repository or from a fork.   44) What are Forks? Forks provide a way to isolate confidential, risky and experimental changes from an original codebase. A fork is a completely new copy of the code repository including branches, commits and files. A fork looks like someone cloned a repository and pushed it to a new, empty repository. Once a Fork is created, you can not share fork files, or branches with the original codebase unless a pull request carries them along.   45) What are the major areas of DevOps tools? Candidates could face this simple question, among other common Azure DevOps interview questions. The answer implies that automation plays a major role in the implementation of DevOps. Therefore, DevOps tools are highly dominant in the areas of planning, code management, building and testing, and release management. In addition, DevOps tools also have functionalities in deployment and monitoring tasks in the DevOps ecosystem.   46) What are the popular DevOps tools for continuous integration and continuous deployment? The notable DevOps tools for continuous integration include Jenkins, GitLab CI, TeamCity, Bamboo, Codeship, CircleCI, and Travis CI. The popular DevOps tools for continuous deployment include Azure Pipelines for Deployment, Jenkins, Bamboo, DeployBot, Shippable, ElectricFlow, and TeamCity.   47) What are continuous testing and the ideal DevOps tools for the same? Candidates could expect to face this entry in frequently-asked Azure DevOps interview questions. First of all, you need to understand that DevOps is not about tools or process improvements. DevOps focuses on people, automation, and culture changes. Therefore, automated testing through writing scripts to execute the testing process automatically enables frequent releases. Many open-source tools for test automation can help in achieving the DevOps objective of continuous testing. Some of the notable DevOps tools for continuous testing are Selenium, JMeter, AntUnit, JUnit, SoapUI, and Cucumber.   48) What is the difference between Azure DevOps Services and Azure DevOps Server? Candidates would generally face this entry as one of the tricky Azure DevOps interview questions. Azure DevOps Services is the cloud service of Microsoft Azure with a highly scalable, reliable, and globally available hosted service. On the other hand, DevOps Server is an on-premises offering, built on a SQL Server back end. Enterprises choose the on-premises option when they need their day within their network. Another scenario for choosing on-premises involves the need for accessing SQL Server reporting services integrating effectively with Azure DevOps data and tools. Both Azure DevOps Services and Azure DevOps Server offer similar basic services, albeit with certain added benefits of the former. Here are the additional advantages of Azure DevOps Services.     Simpler server management.     Better connectivity with remote sites.     Faster access to new and productive features.     Transition in focus from capital expenditures on servers and infrastructure towards operational expenditures on subscriptions.     49) Which factors should I consider for choosing one from Azure DevOps Services and Azure DevOps Server? Candidates could find this entry as one of the advanced Azure DevOps interview questions. Most important of all, you can get follow-up questions regarding each factor in response to this question. The important factors to consider before choosing a platform between Azure DevOps Services and Azure DevOps Server are:     Scope and scale data     Authentication requirements     Users and groups     Management of user access     Security and data protection precedents     Process customization     Reporting   50) What are the different DevOps solution architectures? You can leverage multiple tools and technologies with Azure for the following DevOps scenarios to design solution architectures.     CI/CD for Containers     Java CI/CD using Jenkins and Azure Web Apps     Container CI/CD using Jenkins and Kubernetes on Azure Kubernetes Service     Immutable Infrastructure CI/CD using Jenkins and Terraform on Azure Virtual Architecture     DevTest image factory     CI/CD for Azure VMs     CI/CD for Azure Web Apps   51) What are Azure boards? Azure Boards is an Azure DevOps service that helps in the management of work in software projects. Azure Boards provide a diverse set of capabilities such as customizable dashboards, integrated reporting, and native support for Kanban and Scrum. The core features of Azure Boards include work items, boards, backlogs, sprints, dashboards, and queries. ITBots.in Wishes you all the best!

  • Sumasri Sumasri
React JavaScript Interview Questions With Answers
Mar 31, 2023
React JavaScript Interview Questions With Answers

React is a free JavaScript framework for creating user experiences. It was created by Facebook and is currently utilised extensively in computer programming. It lessens the need for direct DOM handling by using a component-based strategy to create apps. Additionally, React can effortlessly combine with other JS tools and frameworks, giving developers the ability to create robust, adaptable applications that are simple to manage and grow with time. For web developers seeking to create high-performance apps, it is a common option. We have prepared a collection of questions to be asked in the interview which can help you with the preparation.   1) What is Reactjs? React is a JavaScript library that makes building user interfaces easy. It was developed by Facebook.   2) Does React use HTML? No, It uses JSX, which is similar to HTML. 3) When was React first released? React was first released on March 2013.   4) Give me the two most significant drawbacks of React Integrating React with an MVC framework like Rails requires complex configuration. React require the users to know the integration of user interface into the MVC framework. 5) State the difference between Real DOM and Virtual DOM Virtual DOM It updates faster. It cannot be used to update HTML directly. Memory Consumption is less Real DOM It is updated slowly. It allows a direct update from HTML. It wastes too much memory. 6) What is Flux Concept In React? Facebook widely uses flux architecture concept for developing client-side web applications. It is not a framework or a library. It is simply a new kind of architecture that complements React and the concept of Unidirectional Data Flow. 7) Define the term Redux in React Redux is a library used for front end development. It is a state container for JavaScript applications which should be used for the applications state management. You can test and run an application developed with Redux in different environments.   8) What is the 'Store' feature in Redux? Redux has a feature called 'Store' which allows you to save the application's entire State at one place. Therefore all it's component's State are stored in the Store so that you will get regular updates directly from the Store. The single state tree helps you to keep track of changes over time and debug or inspect the application.   9) What is an action in Redux? It is a function which returns an action object. The action-type and the action data are always stored in the action object. Actions can send data between the Store and the software application. All information retrieved by the Store is produced by the actions.   10) Name the important features of React Here, are important features of React. Allows you to use 3rd party libraries Time-Saving Faster Development Simplicity and Composable Fully supported by Facebook. Code Stability with One-directional data binding React Components   11) Explain the term stateless components Stateless components are pure functions that render DOM-based solely on the properties provided to them.   12) Explain React Router React Router is a routing library which allows you to add new screen flows to your application, and it also keeps URL in sync with what’s being shown on the page.   13) What is a dispatcher? A dispatcher is a central hub of the app where you will receive actions and broadcast payload to registered callbacks.   14) What is meant by the callback function? What is its purpose? A callback function should be called when setState has finished, and the component is retendered. As the setState is asynchronous, which is why it takes in a second callback function.   15) Explain the term high order component A higher-order component also shortly known as HOC is an advanced technique for reusing component logic. It is not a part of the React API, but they are a pattern which emerges from React’s compositional nature.   16) Explain the Presentational segment A presentational part is a segment which allows you to renders HTML. The segment’s capacity is presentational in markup.   17) What are Props in react js? Props mean properties, which is a way of passing data from parent to child. We can say that props are just a communication channel between components. It is always moving from parent to child component.   18) Explain yield catchphrase in JavaScript The yield catchphrase is utilized to delay and resume a generator work, which is known as yield catchphrase.   19) Name two types of React component Two types of react Components are: Function component Class component   20) Explain synthetic event in React js Synthetic event is a kind of object which acts as a cross-browser wrapper around the browser’s native event. It also helps us to combine the behaviors of various browser into signal API.   21) What is React State? It is an object which decides how a specific component renders and how it behaves. The state stores the information which can be changed over the lifetime of a React component.   22) How can you update state in react js? A state can be updated on the component directly or indirectly.   23) Explain the use of the arrow function in React The arrow function helps you to predict the behavior of bugs when passed as a callback. Therefore, it prevents bug caused by this all together.   24) State the main difference between Pros and State The main difference the two is that the State is mutable and Pros are immutable.   25) Explain pure components in React js Pure components are the fastest components which can replace any component with only a render(). It helps you to enhance the simplicity of the code and performance of the application.   26) What kind of information controls a segment in React? There are mainly two sorts of information that control a segment: State and PropsState: State information that will change, we need to utilize State. Props: Props are set by the parent and which are settled all through the lifetime of a part.   27) What is 'create-react-app'? 'create-react-app' is a command-line tool which allows you to create one basic react application.   28) Explain the use of 'key' in react list Keys allow you to provide each list element with a stable identity. The keys should be unique.   29) What are children prop? Children props are used to pass component to other components as properties.   30) Explain error boundaries? Error boundaries help you to catch Javascript error anywhere in the child components. They are most used to log the error and show a fallback UI.   31) What is the use of empty tags ? Empty tags are used in React for declaring fragments.   32) Explain strict mode StrictMode allows you to run checks and warnings for react components. It runs only on development build. It helps you to highlight the issues without rendering any visible UI.   33) What are reacted portals? Portal allows you to render children into a DOM node. CreatePortalmethod is used for it.   34) What is Context? React context helps you to pass data using the tree of react components. It helps you to share data globally between various react components.   35) What is the use of Webpack? Webpack in basically is a module builder. It is mainly runs during the development process.   36) What is Babel in React js? Babel, is a JavaScript compiler that converts latest JavaScript like ES6, ES7 into plain old ES5 JavaScript that most browsers understand.   37) How can a browser read JSX file? If you want the browser to read JSX, then that JSX file should be replaced using a JSX transformer like Babel and then send back to the browser.   38) What are the major issues of using MVC architecture in React? Here are the major challenges you will face while handling MVC architecture: DOM handling is quite expensive Most of the time applications were slow and inefficient Because of circular functions, a complex model has been created around models and ideas 39) What can be done when there is more than one line of expression? At that time a multi-line JSX expression is the only option left for you.   40) What is the reduction? The reduction is an application method of handling State.   41) Explain the term synthetic events It is a cross-browser wrapper around the browser’s native event. These events have interface stopPropagation() and preventDefault().   42) When should you use the top-class elements for the function element? If your element does a stage or lifetime cycle, we should use top-class elements.   43) How can you share an element in the parsing? Using the State, we can share the data.   44) Explain the term reconciliation When a component's state or props change then rest will compare the rendered element with previously rendered DOM and will update the actual DOM if it is needed. This process is known as reconciliation.   45) How can you re-render a component without using setState() function? You can use forceUpdate() function for re-rending any component.   46) Can you update props in react? You can’t update props in react js because props are read-only. Moreover, you can not modify props received from parent to child.   47) Explain the term 'Restructuring.' Restructuring is extraction process of array objects. Once the process is completed, you can separate each object in a separate variable.   48) Can you update the values of props? It is not possible to update the value of props as it is immutable.   49) Explain the meaning of Mounting and Demounting The process of attaching the element to the DCOM is called mounting. The process of detaching the element from the DCOM is called the demounting process.   50) What is the use of ‘props-types’ liberary? 'Prop-types' library allows you to perform runtime type checking for props and similar object in a recent application.   ITBots.in wishes you all the best!    

  • Sumasri Sumasri
JavaScript Interview Questions & Answers
Mar 10, 2023
JavaScript Interview Questions & Answers

1. What is JavaScript and how is it used in web development? JavaScript is a programming language used to create interactive effects within web browsers. It can be used for front-end development to create interactive user interfaces, and also for back-end developers to create server-side applications. JavaScript is one of the three core technologies used in web development, alongside HTML and CSS.   2. What is the difference between JavaScript and other programming languages? JavaScript is a dynamically-typed, high-level programming language that is used mainly for front-end and back-end web development. It is unique in that it is executed on the client side, meaning that it runs within a web browser. Other programming languages may be compiled or interpreted and can be used for a wide variety of applications, such as desktop or mobile applications.   3. What is the Document Object Model (DOM) in JavaScript? The Document Object Model (DOM) is a programming interface for HTML and XML documents. It represents the page so that programs can change the document structure, style, and content. The DOM provides a way for programmers to access and manipulate HTML and XML documents, which makes it essential for building dynamic web pages and applications.   4. What are the different data types in JavaScript? JavaScript has seven different data types: undefined, null, boolean, number, string, object, and symbol.   5. How do you declare variables in JavaScript? Variables can be declared using the var, let, or const keywords in JavaScript. The var keyword is used for declaring variables with global or functional scope, while let and const are used for block-scoped variables.   6. What is hoisting in JavaScript? Hoisting is a behaviour in JavaScript where variable and function declarations are moved to the top of their respective scopes. This means that a variable or function can be used before it has been declared, although it will still be undefined until it is assigned a value.   7. What is the scope of JavaScript? Scope refers to the accessibility of variables, functions, and objects in different parts of a JavaScript program. There are two types of scope in JavaScript: global scope and local scope.   8. What are closures in JavaScript? Closures are functions that have access to variables in their outer (enclosing) functions, even after the outer function hasreturned. This is possible because the inner function retains a reference to the variables in the outer function, which are kept alive in memory.   9. What is the difference between an object and an array in JavaScript? An object is a collection of properties, where each property is a key-value pair. An array is an ordered list of values, where each value is accessed by its index number   10. How do you create an object in JavaScript? Objects can be created using object literals or using the Object constructor function. For example, an object can be created using an object literal like this: const person = { name:'John', age:30, address:{ street:'123 Main St', city: 'Anytown', state:'CA' } };   11. What is prototypal inheritance in JavaScript? Prototypal inheritance is a way of creating new objects based on existing objects, by inheriting their properties and methods. In JavaScript, every object has a prototype, which is a reference to another object that it inherits properties and methods from.   12. What is a promise in JavaScript? A promise is a JavaScript object that represents a value that may not be available yet but will be resolved in the future.   13. What is async/await in JavaScript? Async/await is a way to write asynchronous code that looks like synchronous code. It allows developers to write code that waits for a promise to resolve before executing the next line of code.   14. What are the different types of operators in JavaScript? JavaScript has several types of operators, including arithmetic, assignment, comparison, logical, bitwise, and string operators   15. What is the difference between == and === in JavaScript? The == operator compares values for equality, whereas the === operator compares values for equality and type.   16. What is event bubbling in JavaScript? Event bubbling is the process by which an event propagates from the innermost element that triggered the event up to the document root, triggering all event handlers along the way.   17. What is event delegation in JavaScript? Event delegation is a technique in which a single event handler is added to a parent element, rather than multiple event handlers being added to multiple child elements.   18. What is a decorator in JavaScript? A decorator in JavaScript is a function that is used to modify the behaviour of another function or object. Decorators are typically used to add functionality to an existing function or object without modifying its original source code.   19. What is the difference between onclick and addEventListener in JavaScript? The main difference between onclick and addEventListener in JavaScript is how they handle multiple event listeners for the same element. onclick is an inline event handler attribute that can be added to an HTML element to execute a JavaScript function when the element is clicked. It can only handle a single function at a time, which means that if multiple onclick attributes are added to the same element, only the last one will be executed. Also, it cannot be removed once it is set. On the other hand, addEventListener is a method that allows you to attach multiple event listeners to an element. It can handle multiple functions at the same time and the order in which they are added is preserved. Also, it allows you to remove a specific listener from the element using the removeEventListener method.   20. What is JSON and how is it usd in Javascript? JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and write and easy for machines to parse and generate. It is a text format that is used to represent data in a structured way and is widely used for data exchange between web servers and clients. In JavaScript, JSON is used to exchange data between a web server and a web application. The JSON format is based on a subset of the JavaScript programming language and is natively supported by most modern web browsers.  While working with .json file, the syntax will be like:     {                   "First_Name" :  "value";                    "Last_Name": "value ";                      }     While working with JSON objects in .js or .html file, the syntax will be like this:     var varName ={                      "First_Name" :  "value";                       "Last_Name":  "value ";                          }     21. What is AJAX in Javascript? AJAX (Asynchronous JavaScript and XML) is a technique used in web development to exchange data with a web server asynchronously, without the need to reload the entire page. It allows web applications to update parts of a web page without refreshing the entire page, providing a smoother and more responsive user experience. In JavaScript, AJAX is typically implemented using the XMLHttpRequest (XHR) object, which allows you to send HTTP requests to a server and receive responses in different formats,such as HTML, XML, JSON, or plain text. Example: var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() {     if (this.readyState == 4 && this.status == 200) {        // Typical action to be performed when the document is ready:        document.getElementById("demo").innerHTML = xhttp.responseText;     } }; xhttp.open("GET", "filename", true); xhttp.send();   22. What are the different types of errors in JavaScript? Syntax errors: These occur when the syntax of a program is incorrect and prevent the program from running. Syntax errors are usually caused by typographical errors, missing brackets, or invalid statements. For example, forgetting to close a bracket or using an incorrect operator can cause a syntax error. Runtime errors: These occur during the execution of a program and can cause it to crash or behave unexpectedly. Runtime errors are usually caused by invalid data or unexpected conditions, such as dividing a number by zero or trying to access a non existent object property. Logical errors: These occur when a program runs without crashing but produces incorrect or unexpected results. Logical errors are usually caused by errors in the program's algorithm or logic, such as using the wrong formula for a calculation or not handling a specific condition.   23. What is a try-catch in JavaScript? try-catch is a JavaScript statement that allows you to handle exceptions that occur during the execution of a program. The try block contains the code that might throw an exception, while the catch block handles the exception by executing a set of statements.      24. What is the difference between null and undefined in JavaScript? Null is a value that represents the intentional absence of any object value. It is often used to indicate that a variable has no value assigned to it. undefined, on the other hand, is a value that represents an uninitialized variable or a missing property in an object.   25. What is the event loop in JavaScript? The event loop is a mechanism in JavaScript that allows for asynchronous programming. It continuously monitors the call stack and the message queue, and when the call stack is empty, it takes the first message from the queue and adds it to the call stack.   26. IS JAVASCRIPT A CASE-SENSITIVE LANGUAGE? Yes, JavaScript is a case-sensitive language. The language keywords, variables,function names, and any other identifiers must always be typed with a consistent capitalization of letters. So the identifiers Time and TIME will convey different meanings in JavaScript.   27. DEFINE ANONYMOUS FUNCTION It is a function that has no name. These functions are declared dynamically at runtime using the function operator instead of the function declaration. The function operator is more flexible than a function declaration. It can be easily used in the place of an expression For example: var display=function() { alert("Anonymous Function is invoked"); } display();   28. WHAT IS THE MAIN DIFFERENCE BETWEEN VAR, CONST, AND LET? Variables declared with let and const are block-scoped; Variables declared with var are globally-scoped or function-scoped. var variables can be updated and redeclared within its scope; let variables can be updated but not re-declared;const variables can neither be updated nor re-declared. var can be hoisted to the top of their scope.Where var variables are initialised as undefined, let and const variables are not initialised(Temporary Dead Zone, TDZ). While var and let can be declared without being initialised, const must be initialised during declaration.   29. WHAT IS A CALLBACK AND HOW DOES IT WORK BEHIND THE SCENE? The callback is possible only because JavaScript supports the first-class function. A function that has passed as an argument to another function or it can be executed in that other function is called a callback. In short, Callback is a function that is passe to another function. In Node.js, it consists of 4 default threads that are responsible for maintaining the main stack and other queues, most asynchronous functions call other asynchronous functions and then call the callback. You can think of it as a chain of functions and callbacks. All asynchronous and IO operations are directly not handled by the main thread, All callbacks and asynchronous calls have been handled by the other queue which presents in the JS engine.   30. WHAT IS "CALLBACK HELL"? Callback hell is a situation where we nest callbacks in callbacks.   31. HOW MANY WAYS DO WE HAVE FOR DECLARING A FUNCTION AND HOW ARE THEY DIFFERENT FROM EACH OTHER? A function declaration has made of a function keyword, followed by an obligatory function name, a list of parameters in a pair of parenthesis. Shorthand method definition can be possible to use in a method declaration on object literals and ES2015 classes. An Arrow function is defined using a pair of parenthesis that contains the list of parameters. Followed by a fat arrow => and a pair of curly braces that delimits the body statements. In a function expression, you assign a function to a variable. A function can be dynamically created using the Function constructor, but it suffers from security and performance issues and is not advisable to use.   32. WHAT IS THE USE OF THE NAN() FUNCTION? In JavaScript NaN is short for "Not-a-Number". The isNaN() method returns true if a value is NaN. The isNaN() method converts the value to a number before testing it. The NaN() function has only one purpose— to check whether a value is an illegal number.   33. DIFFERENCE BETWEEN ISNAN() AND NUMBER.ISNAN() ? isNaN() method returns true if a value is Not-a-Number. Number.isNaN() returns true if a numberis Not-a-Number. isNaN() converts the value to a number before testing it.   34. WHAT DOES THE ‘THIS’ KEYWORD DO? In an object method, this refers to the object. Alone, this refers to the global object. In a function, this refers to the global object. This keyword is a self-reference for JavaScript objects.   35. Which object? It depends on how this is being invoked: 1. In an object method, this refers to the object. 2. Alone, this refers to the global object. 3. In a function, this refers to the global object. 4. In a function, in strict mode, this is undefined. 5. In an event, this refers to the element that received the event. 6. Methods like call(), apply(), and bind() can refer this to any object.  

  • Sumasri Sumasri
15 Common Interview Questions and How to Answer Them
Feb 24, 2023
15 Common Interview Questions and How to Answer Them

Job searching and interview preparation are two different but equally important aspects of the job-seeking process. While it's impossible to predict exactly what questions an employer will ask, there are some common interview questions that can be anticipated. It is recommended to prepare for these questions to improve the chances of a successful interview. Here are some sample questions and answers:   1. Can you tell me a little about yourself? To respond, guide them through your past, beginning with how you got started in your career or your present field of work take them through your important successes and professional movements, and then share what you want to do next in your career and why you are seeking this job. Good answer sample: "I started my work after graduating with a Business degree in 2018. I've spent my whole career at Google, where I've received three promotions for exceptional performance. I want to join a smaller firm and take on additional leadership and project management responsibilities."   2. How did you hear about the position? The fact that this is the simplest question-and-response situation in an interview doesn't mean it can't harm your prospects at the job if you answer poorly. Answer sample: "I noticed the job advertised on a website and it seemed fascinating, so I wanted to learn more." “I found the position while looking for jobs online” “I heard about it from a friend”   3. What do you know about our company? Your key objective is to demonstrate that you did your study or were familiar with their firm before applying.  If you don't appear to know anything about them, you will come out as desperate, taking whatever work you can find. And that will make you unappealing to any potential employers. Answer sample: “According to what I've read, your organisation is a market leader in supplying security software to other businesses. I glanced over your client list on your website. According to your website, your headquarters are in ........ and you have 25,000 workers globally."   4. Why did you apply for this job? You should sound as though you want the job and are selective. Companies want the top performers, and the best performers are selective when it comes to job opportunities. Avoid negativity and complaints as well. Do not disparage your existing employer or supervisor. Concentrate on the good aspects of the firm you are talking with. Answer sample: "I've always wanted to work for a larger business in this area, and I know you're one of the leaders in this space," is a good example of an answer. I'm quite interested in your services, particularly the mobile applications you've lately developed, and I'd be thrilled to come here and expand my talents with a company like yours."   5. Why should we hire you? Talk about them and how you can help them. What will be the benefit to them if they hire you? What will you do better for them? And demonstrate that you have done your homework. Make it obvious that you understand the responsibilities of this job and are  Answer sample: "I saw in the job role that you're searching for someone with software development experience. I've been doing it for three years and can quickly assist you with software programming".   6. Why do you want to work here? Show them that you understand their job (at least as much as you can from the job description and company website) and that you are happy to be interviewing for this position. Answer sample: "I've been actively looking for work since receiving my Nursing degree. I'm interested in critical care and emergency medicine, and I've heard that your hospital has one of the greatest ERs in the region. I believed the job description suited my experience well, and I saw some of my personal characteristics highlighted, such as multitasking and being able to flourish in a fast-paced workplace, therefore I'd love to start my career here."   7. Why are you looking to leave your current company? Stay optimistic and focused on what you wanted to gain from the decision if you opted to leave on your own terms, rather than bad-mouthing or dwelling on downsides you wanted to avoid. Answer sample: "I was hired for a project management function, but over time that changed and I was no longer being given the opportunity to perform the work I was interested in. I left to seek an opportunity that I believed was better aligned with the direction I'd like to take with my career."   8. Why did you leave your last job? If we decided to leave on our own terms, we must remain optimistic and focus on what we want to learn from the experience. We choose to avoid bad-mouthing or dwelling on negativity. Answer sample: "I left in order to better my career." "My department hired a new boss, and I thought it was the proper moment to quit." "I was employed for a certain purpose, but that changed over time, and I was no longer given that role." “I didn’t feel there was an opportunity to grow or advance further in that role so I decided a   9. What is your greatest weakness? You never want to confess that you have problems relating with others, that you are bad at resolving disagreements, that you are bad at receiving instructions from your bosses, and so on. These things will result in our rejection during the interview. So select a specific speciality, but one that will have no substantial impact on our ability to do this assignment. Answer sample: "I'm not particularly skilled at social media marketing. For the first several years of my career, I was entirely focused on email marketing. That is still my expertise, which is why I applied for the role of Email Marketing Manager. However, I've discovered that understanding the fundamentals of social media marketing is also important since some of the techniques that work there also work well in email. So I started researching and learning about this new area on my own time, a few hours every week, and it's really helped me."   10. What type of work environment do you prefer? Ideally, one that is comparable to the setting of the organisation for which you are applying.  Make your point. Although most companies have a section on their websites dedicated to defining their culture, it is usually loaded with platitudes like "committed to customer satisfaction" and "we encourage our staff to flourish." That tells us absolutely nothing.   11. Where do you see yourself in 5 years? Choose a work-related objective for where you want to be in five years, and make it seem a little tough or ambitious. Also, discuss an objective that is relevant to the sort of position you are interviewing for. You want to sound as though the experience you will get in this position will help you achieve your long-term goals. Answer sample: "I'm delighted you inquired. I envision myself taking on additional responsibility in five years, either through management or higher-level individual contributions. I'm not sure which road to take, but I know my priority right now is to lay a solid foundation and gather significant experience so that I may have a great future in this business."   12. How do you deal with pressure or stressful situations? A fantastic method is to go over our go-to stress-reduction techniques (creating the world's best to-do list, pausing to take 10 deep breaths), and then provide an example of a difficult scenario you handled with ease. People assume that these queries are all about the narrative. And it's a crucial component. Even if our tale isn't precisely what the interviewer asked for, if it's well-framed and we go the additional mile to inform the interviewer what he or she should take away from it, we'll end up making a greater impact. So don't worry too much about having the proper story or appropriate experience. Instead, concentrate on the messages we want to convey.   13. What are your salary requirements? Unfortunately, this question is missing from many listings of example job interview questions and responses. But it's critical because the wrong response here might cost you a lot later in the discussion. They're not convinced if you are any good or if they want to hire you at all. As a result, you can't command a large wage right now. If we set our pricing too low, they will hold us to it afterwards. Have you gone too far? We'll frighten them away before they realise how much we're worth! Maintain our position and tell them we don't have a figure in mind yet or are unsure. Answer sample: "Right now, I'm focused on finding a job that is a good fit for my career. Following that, I'm willing to take any offer you feel is acceptable, but I don't have a certain number in mind just yet, and my goal is to find a position that's a good fit for me."   14. What do you like to do outside of work? If someone asks about our hobbies outside of work, it’s totally OK to open up and share what really makes us tick. (Do keep it semi-professional, though: Saying we like to have a few beers at the local hot spot on Saturday night is fine. Telling them that Monday is usually a rough day for us because we’re always hungover is not.)   15. Do you have any questions for us? Do not inquire about compensation, benefits, time off, or anything else unrelated to the job. Wait for them to bring it up, or until we know they want to hire us. We are highly unlikely to get employed if we do not ask good questions to each individual we interact with. Answer sample: "Yes, I do have a few questions. The first question I had was if this was a freshly formed position or if someone had previously held this post. And, if so, what did that person do after leaving this position?"  

  • Sumasri Sumasri
DevOps Interview Questions & Answers (For Experienced and Intermediate)
Feb 10, 2023
DevOps Interview Questions & Answers (For Experienced and Intermediate)

1. Explain the different phases in DevOps methodology. DevOps mainly has 6 phases and they are: Planning: This is the first phase of a DevOps lifecycle that involves a thorough understanding of the project to ultimately develop the best product. When done properly, this phase gives various inputs required for the development and operations phases. This phase also helps the organization to gain clarity regarding the project development and management process. Tools like Google Apps, Asana, Microsoft teams, etc are used for this purpose.   Development: The planning phase is followed by the Development phase where the project is built by developing system infrastructure, developing features by writing codes, and then defining test cases and the automation process. Developers store their codes in a code manager called remote repository which aids in team collaboration by allowing view, modification, and versioning of the code. Tools like git, IDEs like the eclipse, IntelliJ, and technological stacks like Node, Java, etc are used.   Continuous Integration (CI): This phase allows for automation of code validation, build, and testing. This ensures that the changes are made properly without development environment errors and also allows the identification of errors at an initial stage. Tools like Jenkins, circleCI, etc are used here.   Deployment: DevOps aids in the deployment automation process by making use of tools and scripts which has the final goal of automating the process by means of feature activation. Here, cloud services can be used as a force that assists in upgrade from finite infrastructure management to cost-optimized management with the potential to infinite resources. Tools like Microsoft Azure, Amazon Web Services, Heroku, etc are used.   Operations: This phase usually occurs throughout the lifecycle of the product/software due to the dynamic infrastructural changes. This provides the team with opportunities for increasing the availability, scalability, and effective transformation of the product. Tools like Loggly, BlueJeans, Appdynamics, etc are used commonly in this phase.   Monitoring: Monitoring is a permanent phase of DevOps methodology. This phase is used for monitoring and analyzing information to know the status of software applications. Tools like Nagios, Splunk, etc are commonly used.   2. How is DevOps different than the Agile Methodology? DevOps is a practice or a culture that allows the collaboration of the development team and the operations team to come together for successful product development. This involves making use of practices like continuous development, integration, testing, deployment, and monitoring of the SDLC cycle. DevOps tries to reduce the gap between the developers and the operations team for the effective launch of the product. Agile is nothing but a software development methodology that focuses on incremental, iterative, and rapid releases of software features by involving the customer by means of feedback. This methodology removes the gap between the requirement understanding of the clients and the developers.   3. Differentiate between Continuous Deployment and Continuous Delivery? The main difference between Continuous Deployment and Continuous Delivery are given below: Continuous Deployment Continuous Delivery The deployment to the production environment is fully automated and does not require manual/ human intervention. In this process, some amount of manual intervention with the manager’s approval is needed for deployment to a production environment. Here, the application is run by following the automated set of instructions, and no approvals are needed Here, the work of the application depends on the decision of the team.   4. What can you say about the antipatterns of DevOps? A pattern is something that is most commonly followed by large masses of entities. If a pattern is adopted by an organization just because it is being followed by others without gauging the requirements of the organization, then it becomes an anti-pattern. Similarly, there are multiple myths surrounding DevOps which can contribute to antipatterns, they are:  DevOps is a process and not a culture.  DevOps is nothing but Agile.  There should be a separate DevOps group.  DevOps solves every problem.  DevOps equates to developers running a production environment.  DevOps follows Development-driven management  DevOps does not focus much on development.  As we are a unique organization, we don’t follow the masses and hence we won’t implement DevOps.  We don’t have the right set of people, hence we cant implement DevOps culture.   5. Can you tell me something about Memcached? Memcached is an open-source and free in-memory object caching system that has high performance and is distributed and generic in nature. It is mainly used for speeding the dynamic web applications by reducing the database load. Memcached can be used in the following cases:  Profile caching in social networking domains like Facebook.  Web page caching in the content aggregation domain.  Profile tracking in Ad targeting domain.  Session caching in e-commerce, gaming, and entertainment domain.  Database query optimization and scaling in the Location-based services domain. Benefits of Memcached:  Using Memcached speeds up the application processes by reducing the hits to a database and reducing the I/O access.  It helps in determining what steps are more frequently followed and helps in deciding what to cache. Some of the drawbacks of using Memcached are:  In case of failure, the data is lost as it is neither a persistent data store nor a database.  It is not an application-specific cache.  Large objects cannot be cached.   6. What are the various branching strategies used in the version control system? Branching is a very important concept in version control systems like git which facilitates team collaboration. Some of the most commonly used branching types are: Feature branching This branching type ensures that a particular feature of a project is maintained in a branch. Once the feature is fully validated, the branch is then merged into the main branch. Task branching Here, each task is maintained in its own branch with the task key being the branch name. Naming the branch name as a task name makes it easy to identify what task is getting covered in what branch. Release branching This type of branching is done once a set of features meant for a release are completed, they can be cloned into a branch called the release branch. Any further features will not be added to this branch. Only bug fixes, documentation, and release-related activities are done in a release branch. Once the things are ready, the releases get merged into the main branch and are tagged with the release version number. These changes also need to be pushed into the development branch which would have progressed with new feature development. The branching strategies followed would vary from company to company based on their requirements and strategies.   7. Can you list down certain KPIs which are used for gauging the success of DevOps? KPIs stand for Key Performance Indicators. Some of the popular KPIs used for gauging the success of DevOps are: Application usage, performance, and traffic Automated Test Case Pass Percentage. Application Availability Change volume requests Customer tickets Successful deployment frequency and time Error/Failure rates Failed deployments Meantime to detection (MTTD) Meantime to recovery (MTTR)   8. What is CBD in DevOps? CBD stands for Component-Based Development. It is a unique way for approaching product development. Here, developers keep looking for existing well-defined, tested, and verified components of code and relieve the developer of developing from scratch.   9. What is Resilience Testing? Resilience Testing is a software process that tests the application for its behavior under uncontrolled and chaotic scenarios. It also ensures that the data and functionality are not lost after encountering a failure.   10. Can you differentiate between continuous testing and automation testing? The difference between continuous testing and automation testing is given below: Continuous Testing Automation Testing This is the process of executing all the automated test cases and is done as part of the delivery process. This is a process that replaces manual testing by helping the developers create test cases that can be run multiple times without manual intervention. This process focuses on the business risks associated with releasing software as early as possible. This process helps the developer to know whether the features they have developed are bug-free or not by having set of pass/fail points as a reference.   11. Can you say something about the DevOps pipeline? A pipeline, in general, is a set of automated tasks/processes defined and followed by the software engineering team. DevOps pipeline is a pipeline which allows the DevOps engineers and the software developers to efficiently and reliably compile, build and deploy the software code to the production environments in a hassle-free manner. The flow is as follows: Developer works on completing a functionality. Developer deploys his code to the test environment. Testers work on validating the feature. The business team can intervene and provide feedback too. Developers work on the test and business feedback in a continuous collaboration manner. The code is then released to production and validated again.   12. Tell me something about Ansible work in DevOps It is a DevOps open-source automation tool which helps in modernizing the development and deployment process of applications in faster manner. It has gained popularity due to simplicity in understanding, using, and adopting it which largely helped people across the globe to work in a collaborative manner.   13. How does Ansible work? Ansible has two types of servers categorized as: Controlling machines Nodes For this to work, Ansible is installed on a controlling machine using which the nodes are managed by means of using SSH. The location of the nodes would be specified and configured in the inventories of the controlling machine. Ansible does not require any installations on the remote node servers due to its nature of being agentless. Hence, no background process needs to be executed while managing any remote nodes. Ansible can manage lots of nodes from a single controlling system my making use of Ansible Playbooks through SSH connection. Playbooks are of the YAML format and are capable to perform multiple tasks.   14. How does AWS contribute to DevOps? AWS stands for Amazon Web Services and it is a well-known cloud provider. AWS helps DevOps by providing the below benefits: Flexible Resources: AWS provides ready-to-use flexible resources for usage. Scaling: Thousands of machines can be deployed on AWS by making use of unlimited storage and computation power. Automation: Lots of tasks can be automated by using various services provided by AWS. Security: AWS is secure and using its various security options provided under the hood of Identity and Access Management (IAM), the application deployments and builds can be secured.   15. What can be a preparatory approach for developing a project using the DevOps methodology? The project can be developed by following the below stages by making use of DevOps: Stage 1: Plan: Plan and come up with a roadmap for implementation by performing a thorough assessment of the already existing processes to identify the areas of improvement and the blind spots. Stage 2: PoC: Come up with a proof of concept (PoC) just to get an idea regarding the complexities involved. Once the PoC is approved, the actual implementation work of the project would start. Stage 3: Follow DevOps: Once the project is ready for implementation, the actual DevOps culture could be followed by making use of its phases like version control, continuous integration, continuous testing, continuous deployment, continuous delivery, and continuous monitoring. DevOps Interview Questions For Experienced   16. Can you explain the “Shift left to reduce failure” concept in DevOps? In order to understand what this means, we first need to know how the traditional SDLC cycle works. In the traditional cycle, there are 2 main sides - The left side of the cycle consists of the planning, design, and development phase The right side of the cycle includes stress testing, production staging, and user acceptance. In DevOps, shifting left simply means taking up as many tasks that usually take place at the end of the application development process as possible into the earlier stages of application development. From the below graph, we can see that if the shift left operations are followed, the chances of errors faced during the later stages of application development would greatly reduce as they would have been identified and solved in the earlier stages themselves. The most popular ways of accomplishing shift left in DevOps is to: Work side by side with the development team while creating the deployment and test case automation. This is the first and the obvious step in achieving shift left. This is done because of the well-known fact that the failures that get notices in the production environment are not seen earlier quite often. These failures can be linked directly to:o Different deployment procedures used by the development team while developing their features. o Production deployment procedures sometimes tend to be way different from the development procedure. There can be differences in tooling and sometimes the process might also be manual.  Both the dev team and the operations teams are expected to take ownership to develop and maintain standard procedures for deployment by making use of the cloud and the pattern capabilities. This aids in giving the confidence that the production deployments would be successful.  Usage of pattern capabilities to avoid configurational level inconsistencies in the different environments being used. This would require the dev team and the operation team to come together and work in developing a standard process that guides developers to test their application in the development environment in the same way as they test in the production environment.   17. Do you know about post mortem meetings in DevOps? Post Mortem meetings are those that are arranged to discuss if certain things go wrong while implementing the DevOps methodology. When this meeting is conducted, it is expected that the team has to arrive at steps that need to be taken in order to avoid the failure(s) in the future.   18. What is the concept behind sudo in Linux OS? Sudo stands for ‘superuser do’ where the superuser is the root user of Linux. It is a program for Linux/Unix-based systems that gives provision to allow the users with superuser roles to use certain system commands at their root level.   19. Can you explain the architecture of Jenkins? Jenkins follows the master-slave architecture. The master pulls the latest code from the GitHub repository whenever there is a commitment made to the code. The master requests slaves to perform operations like build, test and run and produce test case reports. This workload is distributed to all the slaves in a uniform manner. Jenkins also uses multiple slaves because there might be chances that require different test case suites to be run for different environments once the code commits are done.   20. Can you explain the “infrastructure as code” (IaC) concept? As the name indicates, IaC mainly relies on perceiving infrastructure in the same way as any code whichis why it is commonly referred to as “programmable infrastructure”. It simply provides means to define and manage the IT infrastructure by using configuration files. This concept came into prominence because of the limitations associated with the traditional way of managing the infrastructure. Traditionally, the infrastructure was managed manually and the dedicated people had to set up the servers physically. Only after this step was done, the application would have been deployed. Manual configuration and setup were constantly prone to human errors and inconsistencies. This also involved increased cost in hiring and managing multiple people ranging from network engineers to hardware technicians to manage the infrastructural tasks. The major problem with the traditional approach was decreased scalability and application availability which impacted the speed of request processing. Manual configurations were also time-consuming and in case the application had a sudden spike in user usage, the administrators would desperately work on keeping the system available for a large load. This would impact the application availability. IaC solved all the above problems. IaC can be implemented in 2 approaches: Imperative approach: This approach “gives orders” and defines a sequence of instructions that can help the system in reaching the final output. Declarative approach: This approach “declares” the desired outcome first based on which the infrastructure is built to reach the final result.   21. What is ‘Pair Programming’? Pair programming is an engineering practice where two programmers work on the same system, the same design, and the same code. They follow the rules of “Extreme Programming”. Here, one programmer is termed as the “driver” while the other acts as an “observer” who continuously monitors the project's progress to identify any further problems.   22. What is Blue/Green Deployment Pattern? A blue-green pattern is a type of continuous deployment, application release pattern which focuses on gradually transferring the user traffic from a previously working version of the software or service to an almost identical new release - both versions running on production. The blue environment would indicate the old version of the application whereas the green environment would be the new version. The production traffic would be moved gradually from blue to green environment and once it is fully transferred, the blue environment is kept on hold just in case of rollback necessity. In this pattern, the team has to ensure two identical prod environments but only one of them would be LIVE at a given point of time. Since the blue environment is more steady, the LIVE one is usually the blue environment.   23. What is Dogpile effect? How can it be prevented? It is also referred to as cache stampede which can occur when huge parallel computing systems employing caching strategies are subjected to very high load. It is referred to as that event that occurs when the cache expires (or invalidated) and multiple requests are hit to the website at the same time. The most common way of preventing dogpiling is by implementing semaphore locks in the cache. When the cache expires in this system, the first process to acquire the lock would generate the new value to the cache.   24. What are the steps to be undertaken to configure git repository so that it runs the code sanity checking tooks before any commits? How do you prevent it from happening again if the sanity testing fails? Sanity testing, also known as smoke testing, is a process used to determine if it’s reasonable to proceed to test. Git repository provides a hook called pre-commit which gets triggered right before a commit happens. A simple script by making use of this hook can be written to achieve the smoke test. The script can be used to run other tools like linters and perform sanity checks on the changes that would be committed into the repository. The following snippet is an example of one such script: #!/bin/sh files=$(git diff –cached –name-only –diff-filter=ACM | grep ‘.py$’) if [ -z files ]; then exit 0 fi unfmtd=$(pyfmt -l $files) if [ -z unfmtd ]; then exit 0 fi echo “Some .py files are not properly fmt’d” exit 1 The above script checks if any .py files which are to be committed are properly formatted by making use of the python formatting tool pyfmt. If the files are not properly formatted, then the script prevents the changes to be committed to the repository by exiting with status 1.   25. How can you ensure a script runs every time repository gets new commits through git push? There are three means of setting up a script on the destination repository to get executed depending on when the script has to be triggered exactly. These means are called hooks and they are of three types: Pre-receive hook: This hook is invoked before the references are updated when commits are being pushed. This hook is useful in ensuring the scripts related to enforcing development policies are run. Update hook: This hook triggers the script to run before any updates are actually made. This hook is called once for every commit which has been pushed to the repository. Post-receive hook: This hook helps trigger the script after the updates or changes have been accepted by the destination repository. This hook is ideal for configuring deployment scripts, any continuous integration-based scripts or email notifications process to the team, etc.

  • Sumasri Sumasri
DevOps Interview Questions and Answer (For Freshers)
Feb 03, 2023
DevOps Interview Questions and Answer (For Freshers)

1. Who is a DevOps engineer? A DevOps engineer is a person who works with both software developers and the IT staff to ensure smooth code releases. They are generally developers who develop an interest in the deployment and operations domain or the system admins who develop a passion for coding to move towards the development side. In short, a DevOps engineer is someone who has an understanding of SDLC (Software Development Lifecycle) and of automation tools for developing CI/CD pipelines.   2. Why has DevOps become famous? These days, the market window of products has reduced drastically. We see new products almost daily. This provides a myriad of choices to consumers but it comes at a cost of heavy competition in the market. Organizations cant afford to release big features after a gap. They tend to ship off small features as releases to the customers at regular intervals so that their products don't get lost in this sea of competition. Customer satisfaction is now a motto to organizations which has also become the goal of any product for its success. In order to achieve this, companies need to do the below things: Frequent feature deployments Reduce time between bug fixes Reduce the failure rate of releases Quicker recovery time in case of release failures. In order to achieve the above points and thereby achieve seamless product delivery, DevOps culture acts as a handy tool. Due to these advantages, multi-national companies like Amazon and Google have adopted the methodology which has resulted in their increased performance.   3. What is the use of SSH? SSH stands for Secure Shell and is an administrative protocol that lets users access and controls the remote servers over the Internet to work using the command line. SSH is a secured encrypted version of the previously known Telnet which was unencrypted and not secure. This ensured that the communication with the remote server occurs in an encrypted form. SSH also has a mechanism for remote user authentication, input communication between the client and the host, and sending the output back to the client.   4. What is configuration management? Configuration management (CM) is basically a practice of systematic handling of changes in such a way that system does not lose its integrity over a period of time. This involves certain policies, techniques, procedures, and tools for evaluating change proposals, managing them, and tracking their progress along with maintaining appropriate documentation for the same. CM helps in providing administrative and technical directions to the design and development of the appreciation.   5. What is the importance of having configuration management in DevOps? Configuration management (CM) helps the team in the automation of time-consuming and tedious tasks thereby enhancing the organization’s performance and agility. It also helps in bringing consistency and improving the product development process by employing means of design streamlining, extensive documentation, control, and change implementation during various phases/releases of the project.   6. What does CAMS stand for in DevOps? CAMS stands for Culture, Automation, Measurement, and Sharing. It represents the core deeds of DevOps.   7. What is Continuous Integration (CI)? Continuous Integration (CI) is a software development practice that makes sure developers integrate their code into a shared repository as and when they are done working on the feature. Each integration is verified by means of an automated build process that allows teams to detect problems in their code at a very early stage rather than finding them after the deployment. A brief overview of the CI process. Developers regularly check out code in their local workspaces and work on the features assigned to them. Once they are done working on it, the code is committed and pushed to the remote shared repository which is handled by making use of effective version control tools like git. The CI server keeps track of the changes done to the shared repository and it pulls the changes as soon as it detects them. The CI server then triggers the build of the code and runs unit and integration test cases if set up. The team is informed of the build results. In case of the build failure, the team has to work on fixing the issue as early as possible and then the process repeats   8. Why is Continuous Integration needed? By incorporating Continuous Integration for both development and testing, it has been found that the software quality has improved and the time taken for delivering the features of the software has drastically reduced. This also allows the development team to detect and fix errors at the initial stage as each and every commit to the shared repository is built automatically and runs against the unit and integration test cases.   9. What is Continuous Testing (CT)? Continuous Testing (CT) is that phase of DevOps which involves the process of running the automated test cases as part of an automated software delivery pipeline with the sole aim of getting immediate feedback regarding the quality and validation of business risks associated with the automated build of code developed by the developers. Using this phase will help the team to test each build continuously (as soon as the code developed is pushed) thereby giving the dev teams a chance to get instant feedback on their work and ensuring that these problems don’t arrive in the later stages of the SDLC cycle. Doing this would drastically speed up the workflow followed by the developer to develop the project due to the lack of manual intervention steps to rebuild the project and run the automated test cases every time the changes are made.   10. What are the three important DevOps KPIs? A few KPIs of DevOps are given below: Reduce the average time taken to recover from a failure. Increase Deployment frequency in which the deployment occurs. Reduced Percentage of a failed deployment

  • Sumasri Sumasri
Database and SQL Interview Question with Answer
Jan 27, 2023
Database and SQL Interview Question with Answer

1. What is a Database? A database is an organized collection of data, stored and retrieved digitally from a remote or local computer system. Databases can be vast and complex, and such databases are developed using fixed design and modelling approaches.   2. What is DBMS? DBMS stands for Database Management System. DBMS is a system software responsible for the creation, retrieval, updation, and management of the database. It ensures that our data is consistent, organized, and easily accessible by serving as an interface between the database and its end-users or application software.   3. What is RDBMS? How is it different from DBMS? RDBMS stands for Relational Database Management System. The key difference here, compared to DBMS, is that RDBMS stores data in the form of a collection of tables, and relations can be defined between the common fields of these tables. Most modern database management systems like MySQL, Microsoft SQL Server, Oracle, IBM DB2, and Amazon Redshift are based on RDBMS.   4. What is SQL? SQL stands for Structured Query Language. It is the standard language for relational database management systems. It is especially useful in handling organized data comprised of entities (variables) and relations between different entities of the data.   5. What is the difference between SQL and MySQL? SQL is a standard language for retrieving and manipulating structured databases. On the contrary, MySQL is a relational database management system, like SQL Server, Oracle or IBM DB2, that is used to manage SQL databases.   6. What are Tables and Fields? A table is an organized collection of data stored in the form of rows and columns. Columns can be categorized as vertical and rows as horizontal. The columns in a table are called fields while the rows can be referred to as records.   7. What are the Constraints in SQL? Constraints are used to specify the rules concerning data in the table. It can be applied for single or multiple fields in an SQL table during the creation of the table or after creating using the ALTER TABLE command. The constraints are: • NOT NULL - Restricts NULL value from being inserted into a column. • CHECK - Verifies that all values in a field satisfy a condition. • DEFAULT - Automatically assigns a default value if no value has been specified for the field. • UNIQUE - Ensures unique values are inserted into the field. • INDEX - Indexes a field providing faster retrieval of records. • PRIMARY KEY - Uniquely identifies each record in a table. • FOREIGN KEY - Ensures referential integrity for a record in another table.   8. What is a Primary Key? The PRIMARY KEY constraint uniquely identifies each row in a table. It must contain UNIQUE values and has an implicit NOT NULL constraint. A table in SQL is strictly restricted to have one and only one primary key, which is comprised of single or multiple fields (columns). CREATE TABLE Students ( /* Create table with a single field as primary key */ ID INT NOT NULL Name VARCHAR(255) PRIMARY KEY (ID) ); CREATE TABLE Students ( /* Create table with multiple fields as primary key */ ID INT NOT NULL LastName VARCHAR(255) FirstName VARCHAR(255) NOT NULL, CONSTRAINT PK_Student PRIMARY KEY (ID, FirstName) ); ALTER TABLE Students /* Set a column as primary key */ ADD PRIMARY KEY (ID); ALTER TABLE Students /* Set multiple columns as primary key */ ADD CONSTRAINT PK_Student /*Naming a Primary Key*/ PRIMARY KEY (ID, FirstName);   9. What is a UNIQUE constraint? A UNIQUE constraint ensures that all values in a column are different. This provides uniqueness for the column(s) and helps identify each row uniquely. Unlike the primary key, there can be multiple unique constraints defined per table. The code syntax for UNIQUE is quite similar to that of PRIMARY KEY and can be used interchangeably. CREATE TABLE Students ( /* Create table with a single field as unique */ ID INT NOT NULL UNIQUE Name VARCHAR(255) ); CREATE TABLE Students ( /* Create table with multiple fields as unique */ ID INT NOT NULL LastName VARCHAR(255) FirstName VARCHAR(255) NOT NULL CONSTRAINT PK_Student UNIQUE (ID, FirstName) ); ALTER TABLE Students /* Set a column as unique */ ADD UNIQUE (ID); ALTER TABLE Students /* Set multiple columns as unique */ ADD CONSTRAINT PK_Student /* Naming a unique constraint */ UNIQUE (ID, FirstName);   10. What is a Foreign Key? A FOREIGN KEY comprises of single or collection of fields in a table that essentially refers to the PRIMARY KEY in another table. Foreign key constraint ensures referential integrity in the relation between two tables. The table with the foreign key constraint is labelled as the child table, and the table containing the candidate key is labelled as the referenced or parent table. CREATE TABLE Students ( /* Create a table with foreign key - Way 1 */ ID INT NOT NULL Name VARCHAR(255) LibraryID INT PRIMARY KEY (ID) FOREIGN KEY (Library_ID) REFERENCES Library(LibraryID) ); CREATE TABLE Students ( /* Create table with foreign key - Way 2 */ ID INT NOT NULL PRIMARY KEY Name VARCHAR(255) LibraryID INT FOREIGN KEY (Library_ID) REFERENCES Library(LibraryID) ); ALTER TABLE Students /* Add a new foreign key */ ADD FOREIGN KEY (LibraryID) REFERENCES Library (LibraryID);   11. What is a Join? List its different types. The SQL Join clause is used to combine records (rows) from two or more tables in a SQL database based on a related column between the two. There are four different types of JOINs in SQL: • (INNER) JOIN: Retrieves records that have matching values in both tables involved in the join. This is the widely used join for queries. SELECT * FROM Table_A JOIN Table_B; SELECT * FROM Table_A INNER JOIN Table_B; • LEFT (OUTER) JOIN: Retrieves all the records/rows from the left and the matched records/rows from the right table. SELECT * FROM Table_A A LEFT JOIN Table_B B ON A.col = B.col; • RIGHT (OUTER) JOIN: Retrieves all the records/rows from the right and the matched records/rows from the left table. SELECT * FROM Table_A A RIGHT JOIN Table_B B ON A.col = B.col; • FULL (OUTER) JOIN: Retrieves all the records where there is a match in either the left or right table. SELECT * FROM Table_A A FULL JOIN Table_B B ON A.col = B.col;   12. What is a Self-Join? A self JOIN is a case of regular join where a table is joined to itself based on some relation between its own column(s). Self -join uses the INNER JOIN or LEFT JOIN clause and a table alias is used to assign different names to the table within the query. SELECT A.emp_id AS "Emp_ID",A.emp_name AS "Employee", B.emp_id AS "Sup_ID",B.emp_name AS "Supervisor" FROM employee A, employee B WHERE A.emp_sup = B.emp_id;   13. What is a Cross-Join? Cross-join can be defined as a cartesian product of the two tables included in the join. The table after join contains the same number of rows as in the cross-product of the number of rows in the two tables. If a WHERE clause is used in cross join then the query will work like an INNER JOIN. SELECT stu.name, sub.subject FROM students AS stu CROSS JOIN subjects AS sub;   14. What is an Index? Explain its different types. A database index is a data structure that provides a quick lookup of data in a column or columns of a table. It enhances the speed of operations accessing data from a database table at the cost of additional writes and memory to maintain the index data structure. CREATE INDEX index_name /* Create Index */ ON table_name (column_1, column_2); DROP INDEX index_name; /* Drop Index */ There are different types of indexes that can be created for different purposes: • Unique and Non-Unique Index: Unique indexes are indexes that help maintain data integrity by ensuring that no two rows of data in a table have identical key values. Once a unique index has been defined for a table, uniqueness is enforced whenever keys are added or changed within the index. CREATE UNIQUE INDEX myIndex ON students (enroll_no); Non-unique indexes, on the other hand, are not used to enforce constraints on the tables with which they are associated. Instead, non- unique indexes are used solely to improve query performance by maintaining a sorted order of data values that are used frequently. • Clustered and Non-Clustered Index: Clustered indexes are indexes whose order of the rows in the database corresponds to the order of the rows in the index. This is why only one clustered index can exist in a given table, whereas, multiple non-clustered indexes can exist in the table. The only difference between clustered and non-clustered indexes is that the database manager attempts to keep the data in the database in the same order as the corresponding keys appear in the clustered index. Clustering indexes can improve the performance of most query operations because they provide a linear-access path to data stored in the database.   15. What is the difference between Clustered and a Non-clustered index? As explained above, the differences can be broken down into three small factors - • Clustered index modifies the way records are stored in a database based on the indexed column. A non-clustered index creates a separate entity within the table which references the original table. • Clustered index is used for easy and speedy retrieval of data from the database, whereas, fetching records from the non-clustered index is relatively slower. • In SQL, a table can have a single clustered index whereas it can have multiple non-clustered indexes.   16. What is Data Integrity? Data Integrity is the assurance of accuracy and consistency of data over its entire life cycle and is a critical aspect of the design, implementation, and usage of any system that stores, processes, or retrieves data. It also defines integrity constraints to enforce business rules on the data when it is entered into an application or a database.   17. What is a Query? A query is a request for data or information from a database table or combination of tables. A database query can be either a select query or an action query. SELECT fname, lname /* select query */ FROM myDb.students WHERE student_id = 1; UPDATE myDB.students /* action query */ SET fname = 'Captain', lname = 'America' WHERE student_id = 1;   18. What is a Subquery? What are its types?  A subquery is a query within another query, also known as a nested query or inner query. It is used to restrict or enhance the data to be queried by the main query, thus restricting or enhancing the output of the main query respectively. For example, here we fetch the contact information for students who have enrolled for the maths subject: SELECT name, email, mob, address FROM myDb.contacts WHERE roll_no IN ( SELECT roll_no FROM myDb.students WHERE subject = 'Maths'); There are two types of subquery - Correlated and Non-Correlated. • A correlated subquery cannot be considered as an independent query, but it can refer to the column in a table listed in the FROM of the main query. • A non-correlated subquery can be considered as an independent query and the output of the subquery is substituted in the main query.   19. What is the SELECT statement?The  SELECT operator in SQL is used to select data from a database. The data returned is stored in a result table, called the result set. SELECT * FROM my DB.students;   20. What are some common clauses used with SELECT queries in SQL? Some common SQL clauses used in conjunction with a SELECT query are as follows: • WHERE clause in SQL is used to filter records that are necessary, based on specific conditions. • ORDER BY clause in SQL is used to sort the records based on some field(s) in ascending (ASC) or descending order (DESC). SELECT * FROM myDB.students WHERE graduation_year = 2019 ORDER BY studentID DESC; • GROUP BY clause in SQL is used to group records with identical data and can be used in conjunction with some aggregation functions to produce summarized results from the database. • HAVING clause in SQL is used to filter records in combination with the GROUP BY clause. It is different from WHERE, since the WHERE clause cannot filter aggregated records. SELECT COUNT(studentId), country FROM myDB.students WHERE country != "INDIA" GROUP BY country HAVING COUNT(studentID) > 5;   21. What are UNION, MINUS and INTERSECT commands? The UNION operator combines and returns the result-set retrieved by two or more SELECT statements. The MINUS operator in SQL is used to remove duplicates from the result-set obtained by the second SELECT query from the result-set obtained by the first SELECT query and then return the filtered results from the first. The INTERSECT clause in SQL combines the result-set fetched by the two SELECT statements where records from one match the other and then returns this intersection of result-sets. Certain conditions need to be met before executing either of the above statements in SQL - • Each SELECT statement within the clause must have the same number of columns • The columns must also have similar data types • The columns in each SELECT statement should necessarily have the same order SELECT name FROM Students /* Fetch the union of queries */ UNION SELECT name FROM Contacts; SELECT name FROM Students /* Fetch the union of queries with duplicates*/ UNION ALL SELECT name FROM Contacts; SELECT name FROM Students /* Fetch names from students */ MINUS /* that aren't present in contacts */ SELECT name FROM Contacts; SELECT name FROM Students /* Fetch names from students */ INTERSECT /* that are present in contacts as well */ SELECT name FROM Contacts;   22. What is Cursor? How to use a Cursor? A database cursor is a control structure that allows for the traversal of records in a database. Cursors, in addition, facilitates processing after traversal, such as retrieval, addition, and deletion of database records. They can be viewed as a pointer to one row in a set of rows. Working with SQL Cursor: 1. DECLARE a cursor after any variable declaration. The cursor declaration must always be associated with a SELECT Statement. 2. Open cursor to initialize the result set. The OPEN statement must be called before fetching rows from the result set. 3. FETCH statement to retrieve and move to the next row in the result set. 4. Call the CLOSE statement to deactivate the cursor. 5. Finally use the DEALLOCATE statement to delete the cursor definition and release the associated resources. DECLARE @name VARCHAR(50) /* Declare All Required Variables */ DECLARE db_cursor CURSOR FOR /* Declare Cursor Name*/ SELECT name FROM myDB.students WHERE parent_name IN ('Sara', 'Ansh') OPEN db_cursor /* Open cursor and Fetch data into @name */ FETCH next FROM db_cursor INTO @name CLOSE db_cursor /* Close the cursor and deallocate the resources */ DEALLOCATE db_cursor   23. What are Entities and Relationships? Entity: An entity can be a real-world object, either tangible or intangible, that can be easily identifiable. For example, in a college database, students, professors, workers, departments, and projects can be referred to as entities. Each entity has some associated properties that provide it an identity. Relationships: Relations or links between entities that have something to do with each other. For example - The employee's table in a company's database can be associated with the salary table in the same database.   24. List the different types of relationships in SQL. • One-to-One - This can be defined as the relationship between two tables where each record in one table is associated with the maximum of one record in the other table. • One-to-Many & Many-to-One - This is the most commonly used relationship where a record in a table is associated with multiple records in the other table. • Many-to-Many - This is used in cases when multiple instances on both sides are needed for defining a relationship. • Self-Referencing Relationships - This is used when a table needs to define a relationship with itself.   25. What is an Alias in SQL? An alias is a feature of SQL that is supported by most, if not all, RDBMSs. It is a temporary name assigned to the table or table column for the purpose of a particular SQL query. In addition, aliasing can be employed as an obfuscation technique to secure the real names of database fields. A table alias is also called a correlation name. An alias is represented explicitly by the AS keyword but in some cases, the same can be performed without it as well. Nevertheless, using the AS keyword is always a good practice. SELECT A.emp_name AS "Employee" /* Alias using AS keyword */ B.emp_name AS "Supervisor" FROM employee A, employee B /* Alias without AS keyword */ WHERE A.emp_sup = B.emp_id;   26. What is a View? A view in SQL is a virtual table based on the result-set of an SQL statement. A view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database.   27. What is Normalization? Normalization represents the way of organizing structured data in the database efficiently. It includes the creation of tables, establishing relationships between them, and defining rules for those relationships. Inconsistency and redundancy can be kept in check based on these rules, hence, adding flexibility to the database.   28. What is Denormalization? Denormalization is the inverse process of normalization, where the normalized schema is converted into a schema that has redundant information. The performance is improved by using redundancy and keeping the redundant data consistent. The reason for performing denormalization is the overheads produced in the query processor by an over-normalized structure.   29. What are the various forms of Normalization? Normal Forms are used to eliminate or reduce redundancy in database tables. The different forms are as follows: • First Normal Form:   A relation is in first normal form if every attribute in that relation is a single-valued attribute. If a relation contains a composite or multi-valued attribute, it violates the first normal form. Let's consider the following students table. Each student in the table, has a name, his/her address, and the books they issued from the public library   Student  Address Books Issued Salutation Sara Amanora Park Town 94 Until the Day I Die (Emily Carpenter), Inception (Christopher Nolan) Ms. Ansh 62nd Sector A-10 The Alchemist (Paulo Coelho), Inferno (Dan Brown) The Alchemist (Paulo Coelho), Inferno (Dan Brown) Sara 24th Street Park Avenue Beautiful Bad (Annie Ward), Woman 99 (Greer Macallister) Mrs. Ansh Windsor Street   777 Dracula (Bram Stoker) Mr   As we can observe, the Books Issued field has more than one value per record, and to convert it into 1NF, this has to be resolved into separate individual records for each book issued. Check the following table in 1NF form -   Student Address Books Issued Salutation Sara Amanora Park Town 94 Until the Day I Die (Emily Carpenter) Ms. Sara Amanora Park Town 94 Inception (Christopher Nolan) Ms. Ansh 62nd Sector A-10 The Alchemist (Paulo Coelho) Mr. Ansh 62nd Sector A-10 Inferno (Dan Brown) Mr. Sara 24th Street Park Avenue Beautiful Bad (Annie Ward) Mrs. Sara 24th Street Park Avenue Woman 99 (Greer Macallister) Mrs. Ansh Windsor Street 777 Dracula (Bram Stoker) Mr.   Second Normal Form: A relation is in second normal form if it satisfies the conditions for the first normal form and does not contain any partial dependency. A relation in 2NF has no partial dependency, i.e., it has no non-prime attribute that depends on any proper subset of any candidate key of the table. Often, specifying a single column Primary Key is the solution to the problem. Examples - Example 1 - Consider the above example. As we can observe, the Students Table in the 1NF form has a candidate key in the form of [Student, Address] that can uniquely identify all records in the table. The field Books Issued (non-prime attribute) depends partially on the Student field. Hence, the table is not in 2NF. To convert it into the 2nd Normal Form, we will partition the tables into two while specifying a new Primary Key attribute to identify the individual records in the  Students table. The Foreign Key constraint will be set on the other table to ensure referential integrity.   Students Table (2nd Normal Form)   Student  Address Books Issued Salutation Sara Amanora Park Town 94 Until the Day I Die (Emily Carpenter), Inception (Christopher Nolan) Ms. Ansh 62nd Sector A-10 The Alchemist (Paulo Coelho), Inferno (Dan Brown) The Alchemist (Paulo Coelho), Inferno (Dan Brown) Sara 24th Street Park Avenue Beautiful Bad (Annie Ward), Woman 99 (Greer Macallister) Mrs. Ansh Windsor Street   777 Dracula (Bram Stoker) Mr   Books Table (2nd Normal Form)   Student_ID Book Issued 1 Until the Day I Die (Emily Carpenter) 1 Inception (Christopher Nolan) 2 The Alchemist (Paulo Coelho) 2 Inferno (Dan Brown) 3 Beautiful Bad (Annie Ward) 3 Woman 99 (Greer Macallister) 4 Dracula (Bram Stoker)   Example 2 - Consider the following dependencies in relation to R(W,X,Y,Z) WX -> Y [W and X together determine Y] XY -> Z [X and Y together determine Z] Here, WX is the only candidate key and there is no partial dependency, i.e., any proper subset of WX doesn’t determine any non-prime attribute in the relation.   Third Normal Form A relation is said to be in the third normal form, if it satisfies the conditions for the second normal form and there is no transitive dependency between the non-prime attributes, i.e., all non-prime attributes are determined only by the candidate keys of the relation and not by any other non-prime attribute. Example 1 - Consider the Students Table in the above example. As we can observe, the Students Table in the 2NF form has a single candidate key Student_ID (primary key) that can uniquely identify all records in the table. The field Salutation (non-prime attribute),however, depends on the Student Field rather than the candidate key. Hence, the table is not in 3NF.  To convert it into the 3rd NormalForm, we will once again partition the tables into two while specifying a new Foreign Key constraint to identify the salutations forindividual records in the Students table. The Primary Key constraint for the same will be set on the Salutations table to identify eachrecord uniquely.   Students Table (3rd Normal Form)   Student  Address Books Issued Salutation Sara Amanora Park Town 94 Until the Day I Die (Emily Carpenter), Inception (Christopher Nolan) Ms.&l

  • Sumasri Sumasri
Java Hibernate Interview Questions With Answers
Jan 23, 2023
Java Hibernate Interview Questions With Answers

1. What is Hibernate? Hibernate - Hibernate Interview Questions- EdurekaHibernate is one of the most popular Java frameworks that simplify the development of Java applications to interact with the database. It is an Object-relational mapping (ORM) tool. Hibernate also provides a reference implementation of Java API. It is referred to as a framework which comes with an abstraction layer and also handles the implementations internally. The implementations include tasks like writing a query for CRUD operations or establishing a connection with the databases, etc. Hibernate develops persistence logic, which stores and processes the data for longer use. It is a lightweight tool and most importantly open-sourced which gives it an edge over other frameworks.   2. What are the major advantages of Hibernate Framework?  It is open-sourced and lightweight. The performance of Hibernate is very fast. Helps in generating database independent queries. Provides facilities to automatically create a table. It provides query statistics and database status.   3. What are the advantages of using Hibernate over JDBC? The major advantages of using Hibernate over JDBC are: Hibernate eliminates a lot of boilerplate code that comes with JDBC API, the code looks cleaner and readable. This Java framework supports inheritance, associations, and collections. These features are actually not present in JDBC. HQL (Hibernate Query Language) is more object-oriented and close to Java. But for JDBC, you need to write native SQL queries. Hibernate implicitly provides transaction management whereas, in JDBC API, you need to write code for transaction management using commit and rollback. JDBC throws SQLException which is a checked exception, so you have to write a lot of try-catch block code. Hibernate wraps JDBC exceptions and throw JDBCException or HibernateException which are the unchecked exceptions, so you don’t have to write code to handle it has built-in transaction management which helps in removing the usage of try-catch blocks. 4. What is an ORM tool? It is basically a technique that maps the object that is stored in the database. An ORM tool helps in simplifying data creation, manipulation, and access. It internally uses the Java API to interact with the databases.   5. Why use Hibernate Framework? Hibernate overcomes the shortcomings of other technologies like JDBC. It overcomes the database dependency faced in the JDBC. Changing of the databases costs a lot working on JDBC, and hibernate overcomes this problem with flying colours. Code portability is not an option while working on JDBC. This is easily handled by Hibernate. Hibernate strengthens the object-level relationship. It overcomes the exception-handling part which is mandatory while working on JDBC. It reduces the length of code with increased readability by overcoming the boilerplate problem. 6. What are the different functionalities supported by Hibernate? Hibernate is an ORM tool. Hibernate uses Hibernate Query Language(HQL) which makes it database-independent. It supports auto DDL operations. This Java framework also has Auto Primary Key Generation support. Supports cache memory. Exception handling is not mandatory in the case of Hibernate. 7. What are the technologies that are supported by Hibernate? Hibernate supports a variety of technologies, like: XDoclet Spring Maven Eclipse Plug-ins J2EE 8. What is HQL? HQL is the acronym for Hibernate Query Language. It is an Object-Oriented Query Language and is independent of the database.   9. How to achieve mapping in Hibernate? Association mappings are one of the key features of Hibernate. It supports the same associations as the relational database model. They are: One-to-One associations Many-to-One associations Many-to-Many associations You can map each of them as a uni- or bidirectional association.    10. Name some of the important interfaces of Hibernate framework? Hibernate interfaces are: SessionFactory (org.hibernate.SessionFactory) Session (org.hibernate.Session) Transaction (org.hibernate.Transaction)   11. What is a One-to-One association in Hibernate? In this type of mapping,  you only need to model the system for the entity for which you want to navigate the relationship in your query or domain model. You need an entity attribute that represents the association, so annotate it with an @OneToOne annotation.   12. What is the One-to-Many association in Hibernate? In this type of association, one object can be associated with multiple/different objects. Talking about the mapping, the One-to-Many mapping is implemented using a Set Java collection that does not have any redundant element. This One-to-Many element of the set indicates the relation of one object to multiple objects.   13. What is a Many-to-Many association in Hibernate? Many-to-Many mapping requires an entity attribute and a @ManyToMany annotation. It can either be unidirectional or bidirectional. In Unidirectional, the attributes model the association and you can use it to navigate it in your domain model or JPQL queries. The annotation tells Hibernate to map a Many-to-Many association. The bidirectional relationship, mapping allows you to navigate the association in both directions.    14. How to integrate Hibernate and Spring? Spring is also one of the most commonly used Java frameworks in the market today. Spring is a JavaEE Framework and Hibernate is the most popular ORM framework. This is why the Spring Hibernate combination is used in a lot of enterprise applications.  Following are the steps you should follow to integrate Spring and Hibernate. Add Hibernate-entity manager, Hibernate-core and Spring-ORM dependencies. Create Model classes and corresponding DAO implementations for database operations. The DAO classes will use SessionFactory which will be injected by the Spring Bean configuration. Note that you don’t need to use Hibernate Transaction Management, as you can leave it to the Spring declarative transaction management using @Transactional annotation.   15. What do you mean by Hibernate Configuration File? Hibernate Configuration File mainly contains database-specific configurations and is used to initialize SessionFactory. Some important parts of the Hibernate Configuration File are Dialect information, so that hibernate knows the database type and mapping file or class details. Hibernate Interview Questions for intermediate 16. Mention some important annotations used for Hibernate mapping. Hibernate supports JPA annotations. Some of the major annotations are: javax.persistence.Entity: This is used with model classes to specify they are entity beans. javax.persistence.Table: It is used with entity beans to define the corresponding table name in the database. javax.persistence.Access: Used to define the access type, field or property. The default value is a field and if you want Hibernate to use the getter/setter methods then you need to set it to a property. javax.persistence.Id: Defines the primary key in the entity bean. javax.persistence.EmbeddedId: It defines a composite primary key in the entity bean. javax.persistence.Column: Helps in defining the column name in the database table. javax.persistence.GeneratedValue: It defines the strategy to be used for the generation of the primary key. It is also used in conjunction with javax.persistence.GenerationType enum. 17. What is a Session in Hibernate and how do get it? Hibernate Session is the interface between the Java application layer and Hibernate. It is used to get a physical connection with the database. The Session object created is lightweight and designed to be instantiated each time an interaction is needed with the database. This Session provides methods to create, read, update and delete operations for a constant object. To get the Session, you can execute HQL queries, SQL native queries using the Session object.   18. What is Hibernate SessionFactory? SessionFactory is the factory class that is used to get the Session objects. The SessionFactory is a heavyweight object so usually, it is created during application startup and kept for later use. This SessionFactory is a thread-safe object which is used by all the threads of an application. If you are using multiple databases then you would have to create multiple SessionFactory objects.   19. What is the difference between openSession and getCurrentSession? This getCurrentSession() method returns the session bound to the context and for this to work, you need to configure it in Hibernate configuration file. Since this session object belongs to the context of Hibernate, it is okay if you don’t close it. Once the SessionFactory is closed, this session object gets closed. openSession() method helps in opening a new session. You should close this session object once you are done with all the database operations. And also, you should open a new session for each request in a multi-threaded environment. 20. What do you mean by Hibernate configuration file? The following steps help in configuring Hibernate file: First, identify the POJOs (Plain Old Java Objects) that have a database representation. Identify which properties of POJOs need to be continued. Annotate each of the POJOs in order to map the Java objects to columns in a database table. Create a database schema using the schema export tool which uses an existing database, or you can create your own database schema. Add Hibernate Java libraries to the application’s classpath. Create a Hibernate XML configuration file that points to the database and the mapped classes. In the Java application, you can create a Hibernate Configuration object that refers to your XML configuration file. Also, build a Hibernate SessionFactory object from the Configuration object. Retrieve the Hibernate Session objects from the SessionFactory and write down the data access logic for your application (create, retrieve, update, and delete). 21. What are the key components of a Hibernate configuration object? The configuration provides 2 key components, namely: Database Connection: This is handled by one or more configuration files. Class Mapping setup: It helps in creating the connection between Java classes and database tables.   22. Discuss the Collections in Hibernate Hibernate provides the facility to persist the Collections. A Collection basically can be a List, Set, Map, Collection, Sorted Set, Sorted Map. java.util.List, java.util.Set, java.util.Collection, etc, are some of the real interface types to declared the persistent collection-value fields. Hibernate injects persistent Collections based on the type of interface. The collection instances generally behave like the types of value behavior.   23. What are the collection types in Hibernate? There are five collection types in hibernate used for one-to-many relationship mappings. Bag Set List Array Map 24. What is a Hibernate Template class? When you integrate Spring and Hibernate, Spring ORM provides two helper classes – HibernateDaoSupport and HibernateTemplate. The main reason to use them was to get two things, the Session from Hibernate and Spring Transaction Management. However, from Hibernate 3.0.1, you can use the SessionFactory getCurrentSession() method to get the current session. The major advantage of using this Template class is the exception translation but that can be achieved easily by using @Repository annotation with service classes.   25. What are the benefits of using Hibernate template? The following are the benefits of using this Hibernate template class: Automated Session closing ability. The interaction with the Hibernate Session is simplified. Exception handling is automated.   26. What are the design patterns that are used in Hibernate framework? There are a few design patterns used in Hibernate Framework, namely: Domain Model Pattern: An object model of the domain that incorporates both behaviours as well as data. Data Mapper: A layer of the map that moves data between objects and a database while keeping it independent of each other and the map itself. Proxy Pattern: It is used for lazy loading. Factory Pattern: Used in SessionFactory. 27. Define Hibernate Validator Framework Data validation is considered an integral part of any application. Also, data validation is used in the presentation layer with the use of Javascript and the server-side code before processing. It occurs before persisting it in order to make sure it follows the correct format. Validation is a cross-cutting task, so we should try to keep it apart from the business logic. This Hibernate Validator provides the reference implementation of bean validation specs.   28. What is Dirty Checking in Hibernate? Hibernate incorporates a Dirty Checking feature that permits developers and users to avoid time-consuming write actions. This Dirty Checking feature changes or updates fields that need to be changed or updated, while keeping the remaining fields untouched and unchanged.   29. How can you share your views on mapping description files? Mapping description files are used by Hibernate to configure functions. These files have the *.hbm extension, which facilitates the mapping between database tables and Java class. Whether to use mapping description files or not entirely depends on the business entities. 30. What is meant by Light Object Mapping? This means that the syntax is hidden from the business logic using specific design patterns. This is one of the valuable levels of ORM quality and this Light Object Mapping approach can be successful in the case of applications where there are very fewer entities, or for applications having data models that are metadata-driven. Hibernate Interview Questions for experienced 31. What is meant by Hibernate tuning? Optimizing the performance of Hibernate applications is known as Hibernate tuning. The performance tuning strategies for Hibernate are: SQL Optimization Session Management Data Caching 32. What is Transaction Management in Hibernate? How does it work? Transaction Management is a property which is present in the Spring framework. Now, what role does it play in Hibernate? Transaction Management is a process of managing a set of commands or statements. In hibernate, Transaction Management is done by the transaction interface. It maintains abstraction from the transaction implementation (JTA, JDBC). A transaction is associated with Session and is instantiated by calling session.beginTransaction().   33. How do you integrate Hibernate with Struts2 or Servlet web applications? You can integrate any Struts application with Hibernate. There are no extra efforts required. Register a custom ServletContextListener. In the ServletContextListener class, first, initialize the Hibernate Session, and store it in the servlet context. Action class helps in getting the Hibernate Session from the servlet context, and performing other Hibernate tasks as normal. 34. What are the different states of a persistent entity? It may exist in one of the following 3 states: Transient: This is not associated with the Session and has no representation in the database. Persistent: You can make a transient instance persistent by associating it with a Session. Detached: If you close the Hibernate Session, the persistent instance will become a detached instance. 35. How can the primary key be created by using Hibernate? A Primary key is a special relational database table column designated to uniquely identify all table records. It is specified in the configuration file hbm.xml. The generator can also be used to specify how a Primary key can be created in the database. 36. Explain Hibernate Proxy and how it helps in Lazy loading? Hibernate uses a proxy object in order to support Lazy loading. When you try loading data from tables, Hibernate doesn’t load all the mapped objects. After you reference a child object through getter methods, if the linked entity is not present in the session cache, then the proxy code will be entered into the database and load the linked object. It uses Java assist to effectively and dynamically generate sub-classed implementations of your entity objects. 37. How can we see Hibernate-generated SQL on the console? In order to view the SQL on a console, you need to add the following in Hibernate configuration file to enable viewing SQL on the console for debugging purposes: true 38. What is Query Cache in Hibernate? Hibernate implements a separate cache region for queries resultset that integrates with the Hibernate second-level cache. This is also an optional feature and requires a few more steps in the code. Note: This is only useful for queries that are run frequently with the same parameters.    39. What is the benefit of Native SQL query support in Hibernate? Hibernate provides an option to execute Native SQL queries through the use of the SQLQuery object. For normal scenarios, it is however not the recommended approach because you might lose other benefits like Association and Hibernate first-level caching. Native SQL Query comes in handy when you want to execute database-specific queries that are not supported by Hibernate API such as query hints or the Connect keyword in Oracle Database.   40. What is a Named SQL Query? Hibernate provides another important feature called Named Query using which you can define at a central location and use anywhere in the code. You can create named queries for both HQL as well as for Native SQL. These Named Queries can be defined in Hibernate mapping files with the help of JPA annotations @NamedQuery and @NamedNativeQuery.   41. When do you use merge() and update() in Hibernate? This is one of the tricky Hibernate Interview Questions asked. update(): If you are sure that the Hibernate Session does not contain an already persistent instance with the same id. merge():  Helps in merging your modifications at any time without considering the state of the Session. 42. Difference between get() vs load() method in Hibernate? This is one of the most frequently asked Hibernate Interview Questions. The key difference between the get() and load() method is: load(): It will throw an exception if an object with an ID passed to them is not found. get():  Will return null. load(): It can return the proxy without hitting the database unless required. get(): It always goes to the database. So sometimes using load() can be faster than the get() method.   43. Difference between the first and second-level cache in Hibernate?  The first-level cache is maintained at the Session level while the second-level cache is maintained at a SessionFactory level and is shared by all sessions. 44. Difference between Session and SessionFactory in Hibernate? This is yet another popular Hibernate Interview Question asked. A Session is a single-threaded, short-lived object. It provides the first-level cache. SessionFactory is immutable and shared by all Sessions. It also lives until the Hibernate is running. It also provides the second-level cache. 45. Difference between the save() and saveOrUpdate() methods of Hibernate? Even though the save() and saveOrUpdate() method is used to store an object into Database, the key difference between them is that save() can only Insert records but saveOrUpdate() can either Insert or Update records.   46. Difference between sorted and ordered collection in Hibernate? Sorted collection sorts the data in JVM’s heap memory using Java’s collection framework sorting methods. The ordered collection is sorted using the order by clause in the database itself. Note: A sorted collection is more suited for small datasets but for a large dataset, it’s better to use an ordered collection to avoid   47. What difference between the transient, persistent and detached states in Hibernate? Transient state: New objects are created in the Java program but are not associated with any Hibernate Session. Persistent state: An object which is associated with a Hibernate session is called a Persistent object. While an object which was earlier associated with Hibernate session but currently it’s not associated is known as a detached object. You can call the save() or persist() method to store those objects in the database and bring them into the Persistent state. Detached state: You can re-attach a detached object to Hibernate sessions by calling either update() or saveOrUpdate() method.   48. Difference between managed associations and Hibernate associations? Managed associations:  Relate to container management persistence and are bi-directional. Hibernate Associations: These associations are unidirectional. 49. What are the best practices that Hibernate recommends for persistent classes? All Java classes that will be persisted need a default constructor. All classes should contain an ID in order to allow easy identification of your objects within Hibernate and the database. This property maps to the primary key column of a database table. All attributes that will be persisted should be declared private and have getXXX and setXXX methods defined in the JavaBean style. A central feature of Hibernate, proxies, depends upon the persistent class being either non-final or the implementation of an interface that declares all public methods. All classes that do not extend or implement some specialized classes and interfaces are required by the EJB framework. 50. What are the best practices to follow with Hibernate framework? Always check the primary key field access, if it’s generated at the database layer then you should not have a setter for this. By default hibernate sets the field values directly, without using setters. So if you want Hibernate to use setters, then make sure proper access is defined as @Access(value=AccessType.PROPERTY). If the access type is property, make sure annotations are used with getter methods and not setter methods. Avoid mixing or using annotations on both file and getter methods. Use native SQL query only when it can’t be done using HQL, such as using the database-specific feature. If you have to sort the collection, use the ordered list rather than sorting it using Collection API. Use named queries wisely, and keep them in a single place for easy debugging. Use them for commonly used queries only. For entity-specific queries, you can keep them in the entity bean itself. For web applications, always try to use JNDI DataSource rather than configuring to create a connection in hibernate. Avoid Many-to-Many relationships, it can be easily implemented using bidirectional One-to-Many and Many-to-One relationships. For collections, try to use Lists, maps and sets. Avoid array because you don’t get the benefit of lazy loading. Do not treat exceptions as recoverable, roll back the Transaction and close the Session. If you do not do this, Hibernate cannot guarantee that the in-memory state accurately represents the persistent state. Prefer DAO pattern for exposing the different methods that can be used with entity bean Prefer lazy fetching for associations.  

  • Sumasri Sumasri
Data Science Interview Questions with Answer
Dec 23, 2022
Data Science Interview Questions with Answer

1. What is Data Science? Data Science is the area of study which involves extracting insights from vast amounts of data using various scientific methods, algorithms, and processes. It helps you to discover hidden patterns in the raw data. The term Data Science has emerged because of the evolution of mathematical statistics, data analysis, and big data. 2. What is the Difference Between Data Science and Machine Learning? Data Science is a combination of algorithms, tools, and machine learning techniques which helps you to find common hidden patterns from the given raw data. Whereas Machine learning is a branch of computer science, that deals with system programming to automatically learn and improve with experience. 3. Name three types of biases that can occur during sampling In the sampling process, there are three types of biases, which are:     Selection bias     Under coverage bias     Survivorship bias   4. Discuss the Decision Tree algorithm A decision tree is a popular supervised machine learning algorithm. It is mainly used for Regression and Classification. It allows breaks down a dataset into smaller subsets. The decision tree can able to handle both categorical and numerical data.   5. What are Prior probability and likelihood? Prior probability is the proportion of the dependent variable in the data set while the likelihood is the probability of classifying a given observant in the presence of some other variable.   6. Explain Recommender Systems? It is a subclass of information filtering techniques. It helps you to predict the preferences or ratings that users are likely to give to a product.   7. Name three disadvantages of using a linear model Three disadvantages of the linear model are:     The assumption of linearity of the errors.     You can’t use this model for binary or count outcomes     There are plenty of overfitting problems that it can’t solve   8. Why do you need to perform resampling? Resampling is done in the below-given cases:     Estimating the accuracy of sample statistics by drawing randomly with replacements from a set of the data point or using as subsets of accessible data     Substituting labels on data points when performing necessary tests     Validating models by using random subsets   9. List out the libraries in Python used for Data Analysis and Scientific Computations.     SciPy     Pandas     Matplotlib     NumPy     SciKit     Seaborn   10. What is Power Analysis? The power analysis is an integral part of the experimental design. It helps you to determine the sample size required to find out the effect of a given size from a cause with a specific level of assurance. It also allows you to deploy a particular probability in a sample size constraint. 11. Explain Collaborative filtering Collaborative filtering is used to search for correct patterns by collaborating viewpoints, multiple data sources, and various agents. 12. What is bias? Bias is an error introduced in your model because of the oversimplification of a machine learning algorithm.” It can lead to underfitting. 13. Discuss ‘Naive’ in a Naive Bayes algorithm? The Naive Bayes Algorithm model is based on the Bayes Theorem. It describes the probability of an event. It is based on prior knowledge of conditions which might be related to that specific event. 14. What is a Linear Regression? Linear regression is a statistical programming method where the score of a variable ‘A’ is predicted from the score of a second variable ‘B’. B is referred to as the predictor variable and A as the criterion variable. 15. State the difference between the expected value and mean value They are not many differences, but both of these terms are used in different contexts. Mean value is generally referred to when you are discussing a probability distribution whereas expected value is referred to in the context of a random variable. 16. What is the aim of conducting A/B Testing? AB testing is used to conduct random experiments with two variables, A and B. The goal of this testing method is to find out changes to a web page to maximize or increase the outcome of a strategy. 17. What is Ensemble Learning? The ensemble is a method of combining a diverse set of learners together to improvise on the stability and predictive power of the model. Two types of Ensemble learning methods are: Bagging The bagging method helps you to implement similar learners on small sample populations. It helps you to make nearer predictions. Boosting Boosting is an iterative method which allows you to adjust the weight of an observation depending on the last classification. Boosting decreases the bias error and helps you to build strong predictive models.   18. Explain Eigenvalue and Eigenvector Eigenvectors are for understanding linear transformations. Data scientists need to calculate the eigenvectors for a covariance matrix or correlation. Eigenvalues are the directions along using specific linear transformation acts by compressing, flipping, or stretching. 19. Define the term cross-validation Cross-validation is a validation technique for evaluating how the outcomes of statistical analysis will generalize for an Independent dataset. This method is used in backgrounds where the objective is forecast, and one needs to estimate how accurately a model will accomplish. 20. Explain the steps for a Data analytics project The following are important steps involved in an analytics project:     Understand the Business problem     Explore the data and study it carefully.     Prepare the data for modelling by finding missing values and transforming variables.     Start running the model and analyze the Big data result.     Validate the model with new data set.     Implement the model and track the result to analyze the performance of the model for a specific period.   21. Discuss Artificial Neural Networks Artificial Neural networks (ANN) are a special set of algorithms that have revolutionized machine learning. It helps you to adapt according to changing input. So the network generates the best possible result without redesigning the output criteria. 22. What is Back Propagation? Backpropagation is the essence of neural net training. It is the method of tuning the weights of a neural net depending on the error rate obtained in the previous epoch. Proper tuning helps you to reduce error rates and to make the model reliable by increasing its generalization. 23. What is a Random Forest? Random forest is a machine learning method which helps you to perform all types of regression and classification tasks. It is also used for treating missing values and outlier values. 24. What is the importance of having a selection bias? Selection Bias occurs when there is no specific randomization achieved while picking individuals or groups or data to be analyzed. It suggests that the given sample does not exactly represent the population which was intended to be analyzed. 25. What is the K-means clustering method? K-means clustering is an important unsupervised learning method. It is the technique of classifying data using a certain set of clusters which is called K clusters. It is deployed for grouping to find out the similarity in the data. 26. Explain the difference between Data Science and Data Analytics Data Scientists need to slice data to extract valuable insights that a data analyst can apply to real-world business scenarios. The main difference between the two is that data scientists have more technical knowledge than business analysts. Moreover, they don’t need an understanding of the business required for data visualization. 27. Explain the p-value? When you conduct a hypothesis test in statistics, a p-value allows you to determine the strength of your results. It is a numerical number between 0 and 1. Based on the value it will help you to denote the strength of the specific result. 28. Define the term deep learning Deep Learning is a subtype of machine learning. It is concerned with algorithms inspired by the structure called artificial neural networks (ANN). 29. Explain the method to collect and analyze data to use social media to predict the weather condition. You can collect social media data using Facebook, Twitter, and Instagram’s API’s. For example, for the tweeter, we can construct a feature from each tweet like tweeted date, retweets, list of followers, etc. Then you can use a multivariate time series model to predict the weather condition. 30. When do you need to update the algorithm in Data science? You need to update an algorithm in the following situation:     You want your data model to evolve as data streams using infrastructure     The underlying data source is changing it is non-stationarity   31. What is Normal Distribution A normal distribution is a set of continuous variables spread across a standard curve or in the shape of a bell curve. You can consider it a continuous probability distribution useful in statistics. It is useful to analyze the variables and their relationships when we are using the normal distribution curve. 32. Which language is best for text analytics? R or Python? Python will more suitable for text analytics as it consists of a rich library known as pandas. It allows you to use high-level data analysis tools and data structures, while R doesn’t offer this feature. 33. Explain the benefits of using statistics by Data Scientists Statistics help Data scientists to get a better idea of customers’ expectations. Using the statistical method Data Scientists can get knowledge regarding consumer interest, behaviour, engagement, retention, etc. It also helps you to build powerful data models to validate certain inferences and predictions. 34. Name various types of Deep Learning Frameworks     Pytorch     Microsoft Cognitive Toolkit     TensorFlow     Caffe     Chainer     Keras   35. Explain Auto-Encoder Autoencoders are learning networks. It helps you to transform inputs into outputs with fewer numbers of errors. This means that you will get output to be as close to the input as possible. 36. Define Boltzmann Machine Boltzmann machines are simple learning algorithms. It helps you to discover those features that represent complex regularities in the training data. This algorithm allows you to optimize the weights and the quantity for the given problem. 37. Explain why Data Cleansing is essential and which method you use to maintain clean data Dirty data often leads to the incorrect inside, which can damage the prospect of any organization. For example, if you want to run a targeted marketing campaign. However, if our data incorrectly tell you that a specific product will be in-demand with your target audience; the campaign will fail.   38. What are skewed Distribution & uniform distribution? Skewed distribution occurs when data is distributed on any one side of the plot whereas uniform distribution is identified when the data spread is equal in the range. 39. When underfitting occurs in a static model? Underfitting occurs when a statistical model or machine learning algorithm is not able to capture the underlying trend of the data. 40. What is reinforcement learning? Reinforcement Learning is a learning mechanism about how to map situations to actions. The end result should help you to increase the binary reward signal. In this method, a learner is not told which action to take but instead must discover which action offers a maximum reward. This method is based on the reward/penalty mechanism.   41. Name commonly used algorithms. The four most commonly used algorithms by Data scientists are:     Linear regression     Logistic regression     Random Forest     KNN   42. What is precision? Precision is the most commonly used error metric in the n classification mechanism. Its range is from 0 to 1, where 1 represents 100% 43. What is a univariate analysis? An analysis which is applied to no attribute at a time is known as a univariate analysis. Boxplot is a widely used, univariate model. 44. How do you overcome challenges to your findings? In order, to overcome the challenges of my finding one need to encourage discussion, Demonstrate leadership and respect different options. 45. Explain cluster sampling technique in Data Science A cluster sampling method is used when it is challenging to study the target population spread across, and simple random sampling can’t be applied. 46. State the difference between a Validation Set and a Test Set A Validation set is mostly considered a part of the training set as it is used for parameter selection which helps you to avoid overfitting of the model being built. While a Test Set is used for testing or evaluating the performance of a trained machine-learning model. 47. Explain the term Binomial Probability Formula? “The binomial distribution contains the probabilities of every possible success on N trials for independent events that have a probability of π of occurring.”   48. What is a recall? A recall is a ratio of the true positive rate against the actual positive rate. It ranges from 0 to 1. 49. Discuss normal distribution The normal distribution is equally distributed as such the mean, median and mode are equal. 50. While working on a data set, how can you select important variables? Explain Following methods of variable selection you can use:     Remove the correlated variables before selecting important variables     Use linear regression and select variables which depend on that p values.     Use Backward, Forward Selection, and Stepwise Selection     Use Xgboost, Random Forest, and plot variable importance chart.     Measure information gained for the given set of features and select the top n features accordingly.   51. Is it possible to capture the correlation between continuous and categorical variables? Yes, we can use analysis of the covariance technique to capture the association between continuous and categorical variables. 52. Treating a categorical variable as a continuous variable would result in a better predictive model? Yes, the categorical value should be considered as a continuous variable only when the variable is ordinal in nature. So it is a better predictive model.  

  • Sumasri Sumasri
HTML Interview Questions With Answer
Dec 16, 2022
HTML Interview Questions With Answer

Q1. What is HTML? HTML stands for Hyper Text Markup Language. It is a language of the World Wide Web. It is a standard text formatting language which is used to create and display pages on the Web. HTML makes the text more interactive and dynamic. It can turn text into images, tables, links. HTML pages are saved by adding .html or .html in web page name. Q2. What is the difference between HTML elements and tags? Elements   The element is an individual component of the HTML web page or document. It represents semantics or meaning. For example, the title element represents the title of the document. Tags             It is the root of the HTML document which is used to specify that the document is HTML. For example, the Head tag is used to contain all the head element in the HTML file.   Q3. What are Attributes and how do you use them? Each tag has additional attributes that change the way the tag behaves or is displayed. For example, a tag has a type attribute, which you can use to specify whether it’s a text field, checkbox, radio button or one of many more options. Attributes are specified directly after the name of the tag, inside the two angled brackets. They should only ever appear in opening tags or in self-closing tags. But, they can never be in closing tags.        Q4. What is the difference between a block-level element and an inline element? Block     A block-level element is drawn as a block that stretches to fill the full width available to it i.e, the width of its container and will always start on a new line. Elements that are block-level by default: , ,, ,.   Inline Inline elements are drawn where they are defined and only take up space that is absolutely needed. The easiest way to understand how they work is to look at how text flows on a page. Examples of elements that are inline by default: , , , , .         Q5. When are comments used in HTML? To understand the code easily, you can add code comments to your HTML document. These are not displayed in the browser, but they help you in leaving notes for yourself and other developers as to what a section of HTML is for. The start of the comment is denoted by . Anything in the middle will be completely ignored, even if it contains valid HTML. For example:   Q6. What are the HTML tags used to display the data in the tabular form? The list of HTML tags used to display data in the tabular form include: Tag                Description           It defines a table                 This tag defines a row in a table      It specifies a group of one or more columns in a table for formatting                This is used with element to specify column properties for each column            This tag is used to group the body content in a table.            It is used to group the header content in a table           It is used to group the footer content in a table   Q7. How to create a Hyperlink in HTML? The HTML provides an anchor tag to create a hyperlink that links one page to another page. These tags can appear in any of the following ways: •    Unvisited link – It is displayed, underlined and blue. •    Visited link – It is displayed, underlined and purple. •    Active link – It is displayed, underlined and red. The syntax of Hyperlink in HTML is: Link Text Q8. Name some common lists that are used when designing a page. There are many common lists used for design a page. You can choose any or a combination of the following list types: Ordered list – The ordered list displays elements in a numbered format. It is represented by tag. Unordered list – The unordered list displays elements in a bulleted format. It is represented by tag. Definition list – The definition list displays elements in definition form like in a dictionary. The , and tags are used to define description list.     Q9. What is semantic HTML? Semantic HTML is a coding style. It is the use of HTML markup to reinforce the semantics or meaning of the content. For example: In semantic HTML tag is not used for bold statement as well as tag is used for italic. Instead of these we use and tags.   Q10. How to create a nested webpage in HTML? The HTML iframe tag is used to display a nested webpage. In other words, it represents a webpage within a webpage. The HTMLtag defines an inline frame. For example: " height="300" width="400">         Q11. What is an image map? An image map is used for linking many different web pages using a single image. It is represented bytag. You can define shapes in images that you want to include as part of an image mapping.       Q12. Does a hyperlink only apply to text? No, hyperlinks can be used both on texts and images. The HTML anchor tag defines a hyperlink that links one page to another page. The “href” attribute is the most important attribute of the HTML anchor tag. Syntax:      Link Text       Q13. What is a Style Sheet? A style sheet is used to build a consistent, transportable, and well-designed style template. You can add these templates on several different web pages. It describes the look and formatting of a document written in the markup language.       Q14. Explain the layout of HTML. HTML layout specifies a way in which the web page is arranged. Every website has a specific layout to display content in a specific manner. Following are different HTML elements which are used to define the different parts of a webpage:   •     : It is used to define a header for a document or a section. •    : This defines a container for navigation links •    : It is used to define a section in a document •    : This is used to define an independent, self-contained article •    : It is used to define content aside from the content •    : It is used to define a footer for a document or a section         Q15. What is a marquee? Marquee is used for the scrolling text on a web page. It scrolls the image or text up, down, left or right automatically. You should put the text which you want to scroll within the …… tag.       Q16. What are the tags used to separate a section of texts? There are three tags that can be used to separate the texts: •     tag – Usually tag is used to separate the line of text. It breaks the current line and conveys the flow to the next line •     tag – This contains the text in the form of a new paragraph. •     tag – It is used to define a large quoted section. If you have a large quotation, then put the entire text within ………. tag.         Q17. What is the difference between DIV and SPAN in HTML? The difference between span and div is that a span element is in-line and usually used for a small chunk of HTML inside a line,such as inside a paragraph. Whereas, a div or division element is block-line which is equivalent to having a line-break before and after it and used to group larger chunks of code. Example: This is interview              Q18. What is the purpose of using alternative texts in images? The purpose of using alternative texts is to define what the image is about. During an image mapping, it can be confusing and difficult to understand what hotspots correspond to a particular link. These alternative texts come in action here and put a description at each link which makes it easy for users to understand the hotspot links easily.       Q19. How to create a new HTML element? You can create new elements for the document in the following way:     It can be also be used in the HTML as:  hello edureka!       Q20. Is the tag considered as a HTML tag? No, the declaration is not an HTML tag. There are many type of HTML, such as, HTML 4.01 Strict, HTML 4.01 Transitional, HTML 4.01 Frameset, XHTML 1.0 Strict, XHTML 1.0 Transitional, XHTML 1.0 Frameset, XHTML 1.1 etc. So, is used to instruct the web browser about the HTML page.       Q21. Why is a URL encoded in HTML? An URL is encoded to convert non-ASCII characters into a format that can be used over the Internet because a URL is sent over the Internet by using the ASCII character-set only. If a URL contains characters outside the ASCII set, the URL has to be converted. The non-ASCII characters are replaced with a “%” followed by hexadecimal digits.       Q22. What is the use of an iframe tag? An iframe is used to display a web page within a web page. Syntax:     Example:   Target to a link:   http://www.itbots.com" name="iframe_a">       Q23. What are the entities in HTML? The HTML character entities are used as a replacement for reserved characters in HTML. You can also replace characters that are not present on your keyboard by entities. These characters are replaced because some characters are reserved in HTML.       Q24. Can you create a multi-colored text on a web page? Yes, we can create a multi-colored text on a web page.  To create a multicolor text, you can use for the specific texts that you want to color.       Q25. How to make a picture of a background image of a web page? To make a picture a background image on a web page, you should put the following tag code after the tag.     Here, replace the “image.gif” with the name of your image file which you want to display on your web page.   Q26. What is the use of a span tag? Explain with example. The span tag is used for following things: •    For adding color on text •    To add background on text •    Highlight any color text Example:   In this page we use span.   Q27. What is the advantage of collapsing white space? White spaces are a blank sequence of space characters, which is treated as a single space character in HTML. Because the browser collapses multiple spaces into a single space, you can indent lines of text without worrying about multiple spaces. This enables you to organize the HTML code into a much more readable format.   Q28. Is there any way to keep list elements straight in an HTML file? By using indents, you can keep the list elements straight. If you indent each sub nested list in further than the parent list, you can easily determine the various lists and the elements that it contains.   Q29. Explain The Key Differences Between LocalStorage And SessionStorage Objects. The key differences between localStorage and sessionStorage objects are as follows: •    The localStorage object stores the data without an expiry date. However, sessionStorage object stores the data for only one session. •    In the case of a localStorage object, data will not delete when the browser window closes.  However, the data gets deleted if the browser window closes, in the case of sessionStorage objects. •    The data in sessionStorage is accessible only in the current window of the browser. But, the data in the localStorage can be shared between multiple windows of the browser.   Q30. When is it appropriate to use frames? Frames can make navigating a site much easier. If the main links to the site are located in a frame that appears at the top or along the edge of the browser, the content for those links can be displayed in the remainder of the browser window.   Q31. How to insert a picture into a background image of a web page? To insert a picture into the background image, you need to place a tag code after the tag in the following way:   Now, replace image.gif with the name of your image file. This will take the picture and make it the background image of your web page.     Q32. What happens if you open the external CSS file in a browser? When you try to open the external CSS file in a browser, the browser cannot open the file, because the file has a different extension. The only way to use an external CSS file is to reference it using tag within another HTML document.   Q33. What is the hierarchy that is being followed when it comes to style sheets? If a single selector includes three different style definitions, the definition that is closest to the actual tag takes precedence. Inline style takes priority over embedded style sheets, which takes priority over external style sheets.     Q34. How do you create text on a webpage that allows you to send an email when clicked? To change the text into a clickable link to send an email, you need to use the mailto command within the href tag. You can write it in the following way: text to be clicked Q35. How are active links different from normal links? The default color for normal and active links is blue. Some browsers recognize an active link when the mouse cursor is placed over that link. Whereas, others recognize active links when the link has the focus. Those that don’t have a mouse cursor over that link is considered a normal link.   Q36. What are the different tags to separate sections of text? The tag is one way to separate the lines of text. There are other tags like the tag and tag that are also used to separate sections of text.         Q37. Are there instances where the text will appear outside of the browser? By default, the text is wrapped to appear within the browser window. However, if the text is part of a table cell with a defined width, the text could extend beyond the browser window.   Q38. Write an HTML table tag sequence that outputs the following: 50 pcs 100 500 10 pcs 5 50 The HTML Code for the above problem is:                    It defines a header cell in a table                This is used to define a cell in a table        It defines the table caption                       50 pcs 100 500 10 pcs 5 50                            Q39. What is the advantage of grouping several checkboxes together? The checkboxes don’t affect one another. But, grouping these checkboxes together help to organize them. Checkbox buttons can have their name and do not need to belong to a group. A single web page can have many different groups of checkboxes.   Q40. What happens if there is no text between the tags? Does this affect the display of the HTML file? If there is no text present between the tags, there is nothing to format. Therefore, no formatting will appear. Some tags, such as the tags without a closing tag like the tag, do not require any text between them.   Q41. What are the limits of the text field size? The default size for a text field is around 13 characters. However, if you include the size attribute, you can set the size value to be as low as 1. The maximum size value will be determined by the browser width. Also, if the size attribute is set to 0, the size will be set to the default size of 13 characters.   Q42. What is the relationship between the border and rule attributes? Default cell borders, with a thickness of 1 pixel, are automatically added between cells if the border attribute is set to a nonzero value. Similarly, If the border attribute is not included, a default 1-pixel border appears when the rules attribute is added to the tag.     Q43. What is SVG? HTML SVG is used to describe the two-dimensional vector and vector or raster graphics. SVG images and their behaviors are defined in XML text files. So as XML files, you can create and edit an SVG image with the text editor. It is mostly used for vector type diagrams like pie charts, 2-Dimensional graphs in an X, Y coordinate system.          Q44. What is button tag? The button tag is used in HTML 5. It is used to create a clickable button within the HTML form on the web page. This tag creates a “submit” or “reset” button. The button tag code is as follows:  Click Here   Q45. List the media types and formats supported by HTML. HTML supports a wide range of media formats for sound, music, videos, movies, and animations. Some of the extensions supported by each media format are: •    Images– png, jpg, jpeg, gif, apng, svg, bmp, BMP ico, png ico •    Audio– MIDI, RealAudio, WMA, AAC, WAV, Ogg, MP3, MP4 •    Video– MPEG, AVI, WMV, QuickTime, RealVideo, Flash, Ogg, WebM, MPEG-4 or MP4   Q46. What is Cell Spacing and Cell Padding? Cell Spacing is referred to as the space or gap between the two cells of the same table. Whereas, Cell Padding is referred to as the gap or space between the content of the cell and cell wall or cell border. Example:                    Q47. What is difference between HTML and XHTML? The differences between HTML and XHTML are: •    HTML is an application of Standard Generalized Markup Language. Whereas, XML is an application of Extensible Markup Language. •    The first one is a static Web Page whereas the later one is a dynamic Web Page. •    HTML allows programmer to perform changes in the tags and use attribute minimization whereas XHTML when user need a new markup tag then user can define it in this. •    HTML is about displaying information whereas XHTML is about describing the information.   Q48. How many types of CSS can be included in HTML? There are three ways to include the CSS with HTML: Inline CSS: It is used for styling small contexts. To use inline styles add the style attribute in the relevant tag. External Style Sheet: This is used when the style is applied to many pages. Each page must link to the style sheet using the tag. The tag goes inside the head section.            Internal Style Sheet: It is used when a single document has a unique style. Internal styles sheet needs to put in the head section of an HTML page, by using the        Q49. What are logical and physical tags in HTML? Logical tags are used to tell the meaning of the enclosed text. The example of the logical tag is tag. When we enclose the text in the strong tag, it tells the browser that enclosed text is more important than other texts. Physical tags are used to tell the browser how to display the text enclosed in the physical tag. Some of the examples of physical tags are , , .   Q50. How can you apply JavaScript to a web page? In order to make your webpage more interactive, you need JavaScript. It is a scripting language that allows you to interact with certain elements on the page, based on user input. As with CSS, there are three main ways of including JavaScript: Inline Certain HTML elements allow you to execute a piece of JavaScript when a certain event occurs. For example, a button allows you to run a script when you click on it. These events are accessed through attributes and differ based on the events that are available on each element. Here is an example that shows an alert with a message when the user clicks on it:  Click me! Script block You can define a script block anywhere on the page, which will get executed as soon as the browser reaches that part of the document. This can be inside the orsection of your document.                     

  • Sumasri Sumasri
Docker Interview questions with Answers Part 2
Nov 05, 2022
Docker Interview questions with Answers Part 2

Continued from Docker Interview questions with Answers Part 1   Docker is the new craze in virtualization and cloud computing. Why are people so excited about it? Answer: Docker is fast, easy for using and a developer-centric DevOps-ish tool. it is easy to package and ship code. Developers will want tools which abstract away a lot of the details of that process. They will just want for seeing their code working. That will lead to all sorts of conflicts with Sys Admins when code will be shipped around and turns out not to work somewhere other than the developer’s environment. Docker will turn to work around that by making code as portable as possible and making that portability user-friendly and simple.   Do you think open source development has heavily influenced cloud technology development? Answer: I think open source software will be closely tied to cloud computing. Both in terms of the software running in the cloud and the development models which have enabled the cloud. Open source software will be cheap, it’s low friction both from an efficiency and a licensing perspective.     Can you give us a quick rundown of what we should expect from your Docker presentation at OSCON this year? Answer: It is aimed at Developers and SysAdmins who will want to get started with Docker in very hands on way. We’ll teach the basics of how to use Docker and how to integrate it into daily workflow.     How is Docker different from other container technologies? Answer: Docker containers are easy to deploy in the cloud. It is capable of getting more applications running on the same hardware compared to other technologies such as Kubernete, Amazon Elastic Contain, etc. Therefore making learners who take Kubernetes Training Hyderabad and developers create, ready-to-run containerized applications and make them manage, deploy and share easily.     Mention some commonly used Docker Commands? Answer: Some among the most commonly used Docker Commands will be as follows:     Command              Description     Dockerd                  Launch the Docker Daemon Info                           Displays information System-Wide Version                                   Displays the Docker Version information Build                                   Builds images for Docker files Inspect                    Returns low-level information on an image or container History                                   Shows Image History Commit                    Creates new images from Container changes Attach                                       Attaches to a running container Load                          Load an image from STDIN or tar archive Create                       Create a new container Diff                            Inspect changes on a container’s file system Kill                             Kill a running container     What is a Docker Hub? Answer: Docker Hub can be considered as a cloud registry which lets us link the code repositories, create the images, and test them. We will also store our pushed images, or we will link to the Docker Cloud, therefore that the images will be deployed to the host. We have a centralized container image discovery resource which will be used for the collaboration of our teams, automating the workflow and distribution, and changing management by creating the development pipeline. Docker Vs VM (Virtual Machine)     Virtual Machines Vs Docker Containers Virtual Machines Docker Containers Need more resources Less resources are used Process isolation is done at hardware level Process Isolation is done at Operating System level Separate Operating System for each VM Operating System resources can be shared within Docker VMs can be customized. Custom container setup is easy Takes time to create Virtual Machine Creation of docker is very quick Booting takes minutes CBooting is done within seconds Do I lose my data when the Docker container exits? Answer: There is no loss of data when any of Docker containers will exit as any of the data that application can write to the disk in order to preserve it. This can be done until the container is explicitly deleted. The file system for the Docker container will persist even after the Docker container is halted.     83. What, in your opinion, is the most exciting potential use for Docker? Answer: The most exciting potential use of Docker is its build pipeline. Most of the Docker professionals will be seen using hyper-scaling with containers, and indeed get a lot of containers on the host which it can run on. These will be known to be blatantly fast. Most of the development – test build pipeline will be completely automated using the Docker framework.   Why is Docker the new craze in virtualization and cloud computing? Answer: Docker will be the newest and the latest craze in the world of Virtualization and also Cloud computing because it will be an ultra-lightweight containerization app which is brimming with potential to prove its mettle.   Why do my services take 10 seconds to recreate or stop? Answer: Docker compose stop attempts to stop a specific Docker container by sending a SIGTERM message. Once this message will be delivered, it CaaS wait for the default timeout period of 10 seconds and once the timeout period will be crossed, it will then send out a SIGKILL message for the container – in order to kill it forcefully. If we are actually waiting for the timeout period, then it will mean that the containers will not shutting down on receiving SIGTERM signals / messages. In an attempt to solve this issue, the following is what we will do: We can ensure that we are using the JSON form of the CMD and also the ENTRYPOINT in dockerfile. Use [“program”, “argument1”, “argument2”] instead of sending it as a plain string as like this – “program argument1 argument2”. Using the string form, which will make Docker run the process using bash which will not handle signals properly. Compose always uses the JSON form. If it is possible then modify the application which we are intended to run by adding an explicit signal handler for the SIGTERM signal Also set the stop_signal to a proper signal which the application will understand and also know how to handle it.     How do I run multiple copies of a Compose file on the same host? Answer: Docker’s compose will makes use of the Project name for creating unique identifiers for all of the project’s containers and resources. In order to run multiple copies of the same project, we will required to set a custom project name using the –p command line option or we could use the COMPOSE_PROJECT_NAME environment variable for this purpose.     What’s the difference between up, run, and start? Answer: On any given scenario, we will always want docker-compose up. Using the command UP, we will start or restart all the services which are defined in a docker-compose.yml file. In the “attached” mode, that will also the default mode – we will be able to see all the log files from all the containers. In the “detached” mode, it can exit after starting all the containers that will continue to run in the background showing nothing over in the foreground. Using docker-compose run command; we can be able to run the one-off or the ad-hoc tasks which will be required to be run as per the Business needs and requirements. This will require the service name to be provided which we would want to run and based on that, it can only start those containers for the services which the running service will depend on. Using the run command, we can run tests or perform any of the administrative tasks as like removing / adding data to the data volume container. It will also very similar to the docker run –ti command that opens up an interactive terminal to the containers an exit status which will matche with the exit status of the process in the container. Using the docker-compose start command; we will only restart the containers which were previously created and were stopped. This command will never create any new Docker containers on its own.     What’s the benefit of “Dockerizing?” Answer: Dockerizing enterprise environments will help teams to leverage over the Docker containers to form a service platform such as a CaaS (Container as a Service). It will provide teams that necessary agility, portability and also lets them control staying within their own network / environment. Most of the developers opt for using Docker and Docker alone because of the flexibility and also the ability that it will provide to quickly build and ship applications to the rest of the world. Docker containers will be portable and these will run on any environment without making any additional changes when the application developers will have to move between Developer, Staging and Production environments. This whole process will be seamlessly implemented without the need of performing any recoding activities for any of the environments. These not only will help to reduce the time between these lifecycle states, but also will ensure that the whole process can be performed with utmost efficiency. There is every possibility for the Developers for debugging any certain issue, fix it and will also update the application with it and propagate this fix to the higher environments with utmost ease. The operations teams will handle the security of the environments while also allow the developers build and ship the applications in an independent manner. The CaaS platform which is provided by Docker framework will deploy on-premise and can also loaded with full of enterprise level security features like role-based access control, integration with LDAP or any Active Directory, image signing and etc. Operations teams will have heavily rely on the scalability provided by Docker and will also leverage over the Dockerized applications across any environments. Docker containers will be so portable that it will allow teams to migrate workloads which will run on an Amazon’s AWS environment to Microsoft Azure without change its code and also with no downtime at all. Docker will allow teams to migrate these workloads from their cloud environments to their physical datacenters and vice versa. This also will enable the Organizations to focus on the infrastructure from the gained advantages both monetarily and also the self-reliability over Docker. The lightweight nature of Docker containers are compared to traditional tools such as virtualization, combined with the ability for Docker containers to run within VMs, allowing teams for optimizing their infrastructure by 20X, and save money in the process.     How many containers can run per host? Answer: Depending on the environment where Docker hosts the containers, there will be as many containers as the environment will support. The application size, available resources such as CPU, memory will decide on the number of containers which will run on an environment. Though containers will create newer CPU on their own but they will definitely provide efficient ways of utilizing the resources. The containers themselves are super lightweight and will only last as long as the process they are running.     Is there a possibility to include specific code with COPY/ADD or a volume? Answer: This will be easily achieved by adding either the COPY or the ADD directives in dockerfile. This can count to be useful if we want to move code along with any of Docker images, example, sending code an environment up the ladder – Development environment to the Staging environment or from the Staging environment to the Production environment. Having said that, we might come across situations where we will required to use both the approaches. We will have the image include the code using a COPY, and use a volume in Compose file to include the code from the host during development. The volume will override the directory contents of the image.     Will cloud automation overtake containerization any sooner? Answer: Docker containers will gain the popularity each passing day and definitely can be a quintessential part of any professional Continuous Integration / Continuous Development pipelines. There is equal responsibility on all the key stakeholders at each Organization for taking up the challenge of weighing the risks and gains on adopting technologies which are budding up on a daily basis. Docker is extremely effective in Organizations that appreciate the consequences of Containerization.     Is there a way to identify the status of a Docker container? Answer: We will identify the status of a Docker container by running the command ‘docker ps –a’, that will in turn list down all the available docker containers with its corresponding statuses on the host. From there we will easily identify the container of interest to check its status correspondingly.     What are the differences between the ‘docker run’ and the ‘docker create’? Answer: The most important difference is that by using the ‘docker create’ command we will create a Docker container in the Stopped state. We will also give it with an ID which can be stored for later usages as well.     This will be achieved by using the command ‘docker run’ with the option –cidfile FILE_NAME as like this: ‘docker run –cidfile FILE_NAME’     Can you remove a paused container from Docker? Answer: It is not possible for removing a container from Docker which is just paused. It is a must which a container will be in the stopped state, before it will be removed from the Docker container.     Is there a possibility that a container can restart all by itself in Docker? Answer: No, it is not possible. The default –restart flag is set for never restart on its     What is the preferred way of removing containers – ‘docker rm -f’ or ‘docker stop’ then followed by a ‘docker rm’? Answer: The best and the preferred way for removing containers from Docker is to use the ‘docker stop’, as it will allow sending a SIG_HUP signal to its recipients providing them the time which is required for performing all the finalization and cleanup tasks. Once this activity can be completed, we will then comfortably remove the container using the ‘docker rm’ command from Docker and thereby updating the docker registry as well.     Difference between Docker Image and container? Answer: Docker container is the runtime instance of docker image. Docker Image can not have a state and its state never changes because it will be just set of files whereas docker container will have its execution state.     What are the main drawbacks of Docker? Answer: Following are drawbacks of Docker : Not provide a storage option Provides a poor monitoring option. No automatic rescheduling of inactive Nodes Complicated automatic horizontal scaling set up     What is Docker Engine? Answer: Docker daemon or Docker engine will represent the server. The docker daemon and the clients will run on the same or remote host, that will communicate through command-line client binary and full RESTful API.     Explain Registries. Answer: There are following types of registry : Public Registry Private Registry Docker’s public registry is called Docker hub, which can allow to store images privately. In Docker hub, we can store millions of images.     What command should you run to see all running container in Docker? Answer: $ docker ps   Write the command to stop the docker container. Answer: $ sudo docker stop container name   What is the command to run the image as a container? Answer: $ sudo docker run -i -t alpine /bin/bash   What are the common instruction in Dockerfile? Answer: The common instruction in Dockerfile are FROM, LABEL, RUN, and CMD.   What is memory-swap flag? Answer: Memory-swap is a modified flag which has meaning if- memory is set. Swap will allow the container to write express memory requirements on disk when the container has exhausted all the RAM which is available to it.     Explain Docker Swarm? Answer: Docker Swarm is native gathering for docker which can help to a group of Docker hosts into a single and virtual docker host. It will offer the standard docker application program interface.     How can you monitor the docker in production environments? Answer: Docker states and Docker Events can be used for monitoring docker in the production environment.     What the states of Docker container? Answer: Following are Important states of Docker container: Running Paused Restarting Exited     What is Virtualization? Answer:Virtualization is a method to logically divide mainframes to allow multiple applications for running simultaneously. This scenario will changed when companies and open source communities can be able to offer a method of handling privileged instructions. It will allow multiple OS to run simultaneously on a single x86 based system     What is Hypervisor? Answer: The hypervisor will allow to create a virtual environment in that the guest virtual machines can operate. It will control the guest systems and checks if the resources are allocated to the guests as per requirement.   Explain Docker object labels. Answer: Docker object labels is a method to apply metadata to docker objects including, images, containers, volumes, network, swam nodes, and services.     Write a Docker file to create and copy a directory and built it using python modules? Answer: FROM pyhton:2.7-slim   WORKDIR /app     COPY . /app     docker build –tag     Where the docker volumes are stored? Answer: /var/lib/docker/volumes   List out some important advanced docker commands Answer:   Command Description docker info Information Command docker pull Download an image docker stats Container information Docker images List of images downloaded     How does communication happen between Docker client and Docker Daemon? Answer: We will communicate between Docker client and Docker Daemon with the combination of Rest API, socket.IO, and TCP.     Explain Implementation method of Continuous Integration(CI) and Continues Development (CD) in Docker? Answer: We required to do the following things: Runs Jenkins on docker We will run integration tests in Jenkins using docker-compose     What are the command to control Docker with System? Answer: systemctl start/stop docker service docker start/stop.   How to use JSON instead of YAML compose file? Answer: docker-compose -f docker-compose.json up   What is the command you need to give to push the new image to Docker registry? Answer: docker push myorg/img How to include code with copy/add or volumes? Answer: In docker file, we required to use COPY or ADD directive. This is useful to relocate code. However, we should use a volume if we want to make changes.     Explain the process of scaling your Docker containers. Answer: The Docker containers can be scaled to any level starting from a few hundred to even thousands or millions of containers. The only condition for this is that the containers required the memory and the OS at all times, and there should not be a constraint when the Docker is getting scaled.     What are the steps for the Docker container life cycle? Answer: Following are the steps for Docker life cycle: Build Pull Run     How can you run multiple containers using a single service? Answer: By using docker-compose, we can run multiple containers using a single service. All docker- compose files can use yaml language.   What is CNM? Answer: CNM will stand for Container Networking Model. It will form the basis of container networking in a Docker environment. This docker’s approach will provide container networking with support for multiple network drivers.     Does Docker offer support for IPV6? Answer: Yes, Docker will provide support IPv6. IPv6 networking is supported only on Docker daemons which will run on Linux hosts. However, if we want to enable IPv6 support in the Docker daemon, we required to modify /etc/docker/daemon.json and set the ipv6 key to true.     What are a different kind of volume mount types available in Docker? Answer: Bind mounts- It will be stored anywhere on the host system   How to configure the default logging driver under Docker? Answer: We required to set the value of log-driver to the name of the logging drive the daemon.jason.fie to configure the Docker daemon to default for a specific logging driver.   Explain Docker Trusted Registry? Answer: Docker Trusted Registry is the enterprise-grade image storage toll for Docker. We should install it after firewall so that we can securely manage the Docker images we will use in the applications.     What are Docker Namespaces? Answer: The Namespace in Docker is a technique that will offer isolated workspaces called the Container. Namespaces can also offer a layer of isolation for the Docker containers.   What are the three components of Docker Architecture? Answer: Following are three components of Docker Architecture: Client Docker-Host Registry     What is client? Answer:Docker will provide Command Line Interface tools to the client to interact with Docker daemon.   What is the method for creating a Docker container? Answer:We will use any of the specific Docker images to create a Docker container using the below command. docker run -t -i command name This command not will create the container but also start it.     What is the best place to find decent examples of ‘compose files’? Answer:Most of the high-key companies which require Docker experts use a specific tool to manage their internal workings. That tool is called GitHub. Other than all of the main functions which it will perform, it is also a great place to find the before- mentioned compose files for Docker containers.   How do you think Docker will change virtualization and cloud environments? Answer:There are a lot of workloads which Docker is ideal for. Both in the hyper-scale world of many containers and in the dev-test-build use case. I will fully expect a lot of companies and vendors to embrace Docker as an alternative form of virtualization on both bare metal and in the cloud.     What are the various states that a Docker container can be in at any given point in time? Answer:There will be four states which a Docker container will be in, at any provided point in time. Those states will be as given as follows: Running Paused Restarting Exited    

  • Superadmin Superadmin
Docker Interview Questions with answers Part 1
Nov 05, 2022
Docker Interview Questions with answers Part 1

What is Docker? Answer: Docker is an open-source container service designed to facilitate applications deployment inside the software containers. It will rely on Linux Kernel Features like namespaces and cgroups ensuring which resource isolation and application packaging along with its dependencies. Docker was licensed under Apache License 2.0 in the binary form and fully written in the Go programming language. It can support several operating systems like Linux, Cloud, Windows, and Mac OS and different platforms like ARM architecture and x86-64 windows platforms.   Why use Docker? Docker has the following benefits: A user can quickly build, ship, and run its applications. A single operating system kernel will run all containers. Docker container is more light-weight than the virtual machines. A user will deploy Docker containers anywhere, on any physical and virtual machines and even on the cloud.   3. List the most used commands of Docker. Some common commands are: ps lists the running containers. dockerd launches Docker Daemon. build is used to build an image from a DockerFile. create is used to create a new image form container’s changes. pull is used to download a specific image or a repository. run is used to run a container. logs display the logs of a container. rm removes one or more containers. 9.rmi removes one or more images. stop is used to stop one or more container. kill is used to kill all running containers.   Does the data get lost, if the Docker container exits? No. any data which application will write to disk can get well preserved in its container until we will explicitly delete the container and the file system will persist even after the container halts.   What is Dockerfile and its use? DockerFile is a text document which is used to assemble a Docker image. It is consist of a list of Docker commands and operating system commands for building an image. These commands will execute automatically in sequence in the Docker environment and create a new Docker image.   How Docker is advantageous over Hypervisors? Docker is advantageous in following ways: It is lightweight. More efficient in terms of resources. It uses very fewer resources and also the underlying host kernel rather than developing its hypervisor.   How to create a Docker container? A Docker Container will be created by running any specific Docker image. Use the following command to create a container . docker run -t -i command name If to verify that whether the container has created or whether that is running or not, use the following command as this command will lists out all the running Docker containers on the host along with their status. docker ps -a   Can json be used instead of yaml for compose file? Yes, json can be used instead of yaml for compose file.   How do I run multiple copies of Compose file on the same host? Compose will use the project name which will allow to create unique identifiers for all of a project’s containers and other resources. To run multiple copies of a project, set a custom project name using the -a command-line option or using COMPOSE_PROJECT_NAME environment variable.   What are the components of Docker Architecture? Docker Client (docker) – it will enable a user for Docker interaction. It will communicate with more than one Docker Daemon. It can use Docker API and can send command ( docker run) to Docker Daemon ( dockerd ) which carries them out. Docker Daemon ( dockerd ) – It will give a complete environment to execute and run applications. It is consists of images, containers, volumes and responsible for all container-related actions. It can pull and create the container images as what the client requests. A Daemon will communicate with other daemons for its service management. Docker registry -is versioning, storage, and distribution system for Docker images. It allows Docker users to pull images locally, and push new images to the registry. Docker Hub is a public registry instance of Docker used by default while installing Docker Engine. Docker Image- is a lightweight, standalone, executable package of Docker stored in a Docker Registry. It can be used for creating a container. It will consist of everything required to run an application- code, a runtime, system libraries, system tools, environment variables, configuring files, and settings. Docker Container– It is a standardized unit of software used for deploying a particular application or environment. It is launched by running an image. It can package up code and all of its dependencies therefore apps will run quickly and reliably from one computing environment to another.   On what platforms does Docker run? Docker will run on various platforms as follows: Linux Ubuntu 12.04, 13.04 et al Fedora 19/20+ RHEL 6.5+ CentOS 6+ Gentoo ArchLinux openSUSE 12.3+ CRUX 3.0+ Microsoft Windows Windows Server 2016 Windows 10 Cloud Amazon EC2Google Compute Engine Microsoft Azure Rackspace   What is the purpose of Docker_Host? It will contain container, images, and Docker daemon. It will offer a complete environment to execute and run application.   What is Docker Engine? Docker Engine is a Client-Server application which is installed on the host machine. It will allows to develop, assemble, ship, and run applications anywhere. It can be available for Linux or Windows Server. Its major components are as follows: Server is a long-running program which is called a Daemon process (docker ) REST API specifies interfaces which docker will use to communicate with Daemon and instruct it what to do. CLI (Command Line Interface) – It will use the Docker REST API to manage and interact with the Daemon through its scripting commands.   14. What is the Lifecycle of Docker container? Answer: The Lifecycle of Docker Container with CLI is as following: Create a Container. Run the created Container. Pause the processes running inside the Container. Unpause the processes running inside the Container. Start the Container, if exists in a stopped state. Stop the Container as well as the running processes. Restart the Container as well as the running processes. Kill the running Container. Destroy the Container, only if it exists in a stopped state.   What is Kubernetes and Docker? Docker is a platform and tool to build, distribute, and run Docker containers. Kubernetes is a container orchestration system for Docker containers which is more extensive than Docker Swarm and will be meant to coordinate clusters of nodes at scale in production in an efficient manner.   When should I use Docker? When To Use Docker? Use cases for Docker include: Use Docker as version control system for entire app’s operating system. Use Docker when want to distribute/collaborate on app’s operating system with a team. Use Docker to run code on laptop in the same environment as we have on your server (try the building tool).   What is the advantage of Docker? The most important advantages to a Docker-based architecture is actually standardization. Docker will provide repeatable development, build, test, and production environments. Every team member can work on a production parity environment by Standardizing service infrastructure across the entire pipeline.   Why is Docker needed? Docker is required to ease the creation, deploy and the delivery of an application using the called Containers. A Docker Container has just the minimum set of operating system not a full operating system, a software required for the application to run and rely on the host Linux Kernel itself.   Is Kubernetes better than Docker? Kubernetes and Docker isn’t an alternative of each other. Quite the contrary; Kubernetes will run without Docker and Docker will function without Kubernetes. Kubernetes will benefit greatly from Docker and vice versa. Docker is a standalone software which will be installed on any computer to run containerized applications.   What is the difference between Docker and Openshift? The main difference between Docker and Openshift is that Docker as a project will focuse on the runtime container only, whereas OpenShift as a system will include both the runtime container along the REST API, coordination, and web interfaces for deploying and manage individual containers. A cartridge has similarity to a docker image.   What are the disadvantages of Docker? Some disadvantages with Docker are: Containers will not run at bare-metal speeds. Containers consume resources more efficiently than virtual machines but still it is subject to performance overhead due to overlay networking, interfacing between containers and the host system and so on.   22. What is the most popular use of Docker?  The most common technologies running in Docker are: NGINX: Docker is mostly used for deploying and run HTTP servers. Redis: This popular key-value store is a regular feature a top the list of container images. Postgres: The open source relational database is steadily increasing in popularity.   Should I use Docker for development? The development environment is the similar as the production environment. We will deploy and it can “just work”. If it is hard time to build something by build or compile, build it inside Docker.     Is Docker a VM? In a virtual machine, valuable resources will be emulated for the guest OS and hypervisor, that will make it possible to run many instances of one or more operating systems in parallel on a single machine or host. Docker containers are executed with the Docker engine not within the hypervisor.   Why is Docker so popular? Docker is popular because it has revolutionized development.The main benefit is that containers create vast economies of scale.   How do I download Docker?  Following way Docker can be downloaded: Install Docker for Mac run it Double-click Docker.dmg for openning the installer, then drag Moby the whale to the Applications folder. Double-click Docker.app in the Applications folder to start Docker. Click the whale ( ) to get Preferences and other options. Select About Docker to verify that you have the latest version.   Talk about Docker performance? Docker does well when compared to virtual machines in relation to performance, because containers will share the host kernel and will not emulate a full operating system. However, Docker does impose performance costs. If we required to get the best possible performance out of server, we may required to avoid Docker.   What can you do with Docker? We are just some of the use cases which will provide a consistent environment at low overhead with the enabling technology of Docker. Simplifying Configuration. Code Pipeline Management. Developer Productivity. App Isolation. Server Consolidation. Debugging Capabilities. Multi-tenancy.   What are Docker images? A Docker image is a file which is comprised of multiple layers, used for executing code in a Docker container. An image will be essentially built from the instructions for a complete and executable version of an application, which will relies on the host OS kernel.   Is Docker a Microservice? Docker will Benefits for Microservices. Docker, as a containerization tool, will be often compared to virtual machines. Virtual machines are introduced to optimize the use of computing resources. We will run several VMs on a single server and deploy each application instance on a separate virtual machine.   How much does Docker cost?  As of now, Docker offers three enterprise editions of its software. Pricing which is start at $750 per node per year.   What is docker in AWS? Docker is a software platform which will allow to build, test, and deploy applications quickly. Running Docker on AWS will provide developers and admins a highly reliable, low-cost way for building, ship, and run distributed applications at any scale.   Is Kubernetes free? Pure open source Kubernetes is free and it can be downloaded from its repository on GitHub. Administrators should build and deploy the Kubernetes release to a local system or cluster or to a system or cluster in a public cloud, such as AWS, Google Cloud Platform (GCP) or Microsoft Azure.   Difference between virtualization and containerization? Containers will provide an isolated environment to run the application. The entire user space will be explicitly dedicated to the application. Any changes which are made inside the container will never reflected on the host or even other containers running on the same host. Containers will be an abstraction of the application layer. Each container has a different application. In virtualization, hypervisors will provide an entire virtual machine to the guest including Kernel. Virtual machines will be an abstraction of the hardware layer. Each VM is a physical machine.   Explain how you can clone a Git repository via Jenkins? To clone a Git repository via Jenkins, we have to enter the e-mail and user name for Jenkins system. To do that we have to switch into job directory and execute the “git config” command.   What is a Docker Container and its advantages? Docker containers will include the application and all of its dependencies. It will share the kernel with other containers, running as isolated processes in user space on the host operating system. Docker containers will not required any specific infrastructure, they will run on any infrastructure, and in any cloud. Docker containers will be basically runtime instances of Docker images. Following are major advantage of using Docker Container:- It will offer an efficient and easy initial set up. It will allow to describe application lifecycle in detail. Simple configuration and interacts with Docker Compose. Documentation will provide every bit of information.   37. Explain Docker Architecture?  Docker Architecture will consist of a Docker Engine that is a client-server application:- A server which is a type of long-running program which is called a daemon process ( the docker command ). A REST API which will specify interfaces that programs will use to talk the daemon and instruct it what to do. A command-line interface (CLI) client (the docker command) The CLI will use the Docker REST API to control or interact with Docker daemon applications use the underlying API and CLI.   What is Docker Hub? Docker hub is a cloud-based registry that will help us to link code repositories. It will allows us to build, test, store image in the Docker cloud. We can deploy the image to host with the help of the Docker hub.   What are the important features of Docker? Following are the essential features of Docker: Easy Modeling version Control Placement/Affinity Application Agility Developer Productivity Operational Efficiencies   40. What are the main drawbacks of Docker? Following are the disadvantages of Docker which we should keep in mind It will not provide a storage option. Offer a poor monitoring option. No automatic rescheduling of inactive Nodes. Complicated automatic horizontal scaling set up.   Tell us something about Docker Compose. Docker Compose is a YAML file which will contain details about the service, network, and volumes to set up the Docker application. Therefore, we will use Docker compose for creating separate containers, host them and get them to communicate with other containers.   What is Docker Swarm? Docker Swarm is native clustering for Docker. It will turn a pool of Docker hosts into a single, virtual Docker host. Docker Swarm will serve the standard Docker API, any tool which already communicates with a Docker daemon will be use Swarm to transparently scale to multiple hosts.   What is Docker Engine? Docker daemon or Docker engine will represent the server. The docker daemon and the clients will run on the same or remote host, which will communicate through command-line client binary and full RESTful API.   Explain Registries The two types of registry are Public Registry Private Registry Docker’s public registry is called Docker hub, which will allow to store images privately. In Docker hub, we will store millions of images.   What command should you run to see all running container in Docker? $docker ps   Write the command to stop the Docker Container.  $ sudo docker stop container name   What is the command to run the image as a container?  $ sudo docker run -i -t alpine /bin/bash   Explain Docker object labels.  Docker object labels is a method to apply metadata to docker objects which will include images, containers, volumes, network, swarm nodes, and services.   Write a Docker file to create and copy a directory and built it using python modules? FROM pyhton:2.7-slim WORKDIR /app COPY . /app docker build –tag   Where the docker volumes are stored? We required to navigate to: /var/lib/docker/volumes   How do you run multiple copies of Compose file on the same host? Compose will use the project name which will allow us for creating unique identifiers for all of a project’s containers and other resources. To run multiple copies of a project, set a custom project name using the -a command-line option or using COMPOSE_PROJECT_NAME environment variable.   Did Docker come up with the ‘container’ technology? No, Docker did not come up with the container technology. Multiple other development tools offer containers similar to Docker.   How is Docker better than other tools that use containers, then?  Docker will utilise the cloud to run its container-related operations – which is not used by many other development tools. Docker has become much more flexible and adaptable to different scenarios using the cloud, which might come up during the development or shipment processes. This is the main reason to use the Docker when compared to other container-based developer tools.   What is a Dockerfile? A Dockerfile is a set of instructions. Developers provided Docker with such instructions therefore the program could do the job correctly, with those specific parameters in mind.   What are the three main types of Docker components? The Client, the Host, and the Registry. The client is the component which will issue “run” and “build” commands to the host. The host is where all of the containers and images will be created. They will be then sent to the registry, for execution.   Will you lose all of your work if you accidentally exit a container? No, We won’t lose any information, data and other parameters if we accidentally exit the Docker container. The only way to lose progress would be to issue a specific command to delete the container – exiting it won’t do the files within any harm.   Can you use any other files for composing instead of the default YAML? Yes, The more popular version to use than YAML is the good-old JSON.   What is ‘NameSpaces’ used for? NameSpaces will isolate the Docker containers from other activities or tampering with them.   What is the single most important requirement for building a Docker container? The most important requirement for building a container with Docker is the default image. This default image will vary depending on the code that we are using. To find out and access the default image, we should go to the Docker Hub and search for the specific domain that we required. After we find the image, all that’s left to do is deal with the documentation and that’s it – we can create a Docker container.     How does Docker manage ‘Dockerized nodes’? A Dockerized node can be any machine which has Docker installed and running. Docker will manage both in-house and cloud-based nodes. Therefore, whether the node will exist in the area of the main computer running Docker or it is present on the cloud – it will not matter. Docker can manage it without a problem.   What are the main factors that dictate the number of containers you can run? There is no defined limit of containers that we can run with Docker. The limitations may start due to hardware. Two factors might limit the number of containers that we can run – the size of app and CPU strength. If application isn’t ginormous and we have a never-ending supply of CPU power, we could probably run a huge amount of Docker container simultaneously.   How is Docker different from Hypervisor? Hypervisor will require to have extensive hardware to function properly, while Docker will run on the actual operating system. This will allow Docker to be exceptionally fast and perform tasks in a fluid manner – something which Hypervisor tends to lack.     Can I use JSON instead of YAML for my compose file in Docker? YES, We can very comfortably use JSON instead of the default YAML for Docker compose file. In order to use JSON file with compose, we required to specify the filename to use as the following: docker-compose -f docker-compose.json up     Tell us how you have used Docker in your past position? We could also explain the ease that this technology has brought in the automation of the development to production lifecycle management. We can also discuss about any other integrations that we might have worked along with Docker like Puppet, Chef or even the most popular of all technologies – Jenkins.   How to create Docker container? We will create a Docker container out of any specific Docker image of choice and the same can be achieved using the command given below: docker run -t -i command name The command above can create the container . In order to check whether the Docker container will be created and whether it is running or not, we could make use of the following command. This command can list out all the Docker containers along with its statuses on the host that the Docker container runs. docker ps –a   How to stop and restart the Docker container? The following command will be used to stop a certain Docker container with the container id as CONTAINER_ID: docker stop CONTAINER_ID The following command will be used to restart a certain Docker container with the container id as CONTAINER_ID: docker restart CONTAINER_ID   How far do Docker containers scale? The Web deployments such as Google, Twitter and best examples in the Platform Providers such as Heroku, dotCloud run on Docker that can scale from the ranges of hundreds of thousands to millions of containers running in parallel, provided the condition which the OS and the memory will not run out from the hosts which runs all these innumerable containers hosting your applications.   What platforms does Docker run on? Docker will currently available on the following platforms and also on the following Vendors or Linux: 1. Ubuntu 12.04, 13.04 Fedora 19/20+ RHEL 6.5+ 4 CentOS 6+ Gentoo ArchLinux openSUSE 12.3+ CRUX 3.0+ Docker will currently available and run on the following Cloud environment setups as following: Amazon EC2 Google Compute Engine Microsoft Azure Rackspace Docker is extending it will support to Windows and Mac OSX environments and support on Windows has been on the growth in a very drastic manner.   What is the advantage of Docker over hypervisors? Answer: Docker is lightweight and more efficient in resource uses because it will use the underlying host kernel rather than creating its hypervisor.   Is Container technology new? No, container technology is not new. Different variations of containers technology ate out there in *NIX world for a long time. Solaris container (aka Solaris Zones)-FreeBSD Jails-AIX Workload Partitions (aka WPARs)-Linux OpenVZ are examples.   How is Docker different from other container technologies? Docker is a quite fresh project. It was created in the Era of Cloud, Therefore a lot of things are better than in other container technologies. Following are the features which are good in Docker: Docker will run on any infrastructure, we can run docker on laptop, or can run it in the cloud. Docker has a Container HUB which is a repository of containers that can download and use. We can even share containers with any applications. Docker is quite well documented.   What are the networks that are available by default? bridge It is the default network all containers connect to if we will not specify the network. none connects to a container-specific network stack which will lack a network interface host connects to the host’s network stack – there will be no isolation between the host machine and the container, as far as network is concerned   Difference between Docker Image and container? The runtime instance of docker image is the Docker container. Docker Image will not have a state, and its state will never change as it will just set of files whereas docker container will have its execution state.   What is the use case for Docker? There are use cases where we can use Docker in production.   How exactly are containers (Docker in our case) different from hypervisor virtualization (vSphere)? What are the benefits? To run an application in a virtualized environment (example for vSphere), we first required for creating a VM, install an OS inside and only then deploy the application. To run the same application in docker, all we required is to deploy that application in Docker. There is no need for additional OS layer. We just deploy the application with its dependent libraries, docker engine (kernel, etc.) which will provide the rest. Another benefit of Docker is speed of deployment.   Click here for Docker interview questions with Answers PART 2  

  • Superadmin Superadmin
Java Interview Questions With Answers (For freshers)
Sep 22, 2022
Java Interview Questions With Answers (For freshers)

Java is a computer programming language and platform. As one of the most popular programming languages, it offers a wide variety of job opportunities. If you are a fresher and preparing for a Java interview then please keep on reading. We have prepared a collection of questions to be asked in the interview which can help you with the preparation.   1. Why is Java a platform-independent language? Java language was developed in such a way that it does not depend on any hardware or software due to the fact that the compiler compiles the code and then converts it to platform-independent byte code which can be run on multiple systems. The only condition to run that byte code is for the machine to have a runtime environment (JRE) installed in it   2. Why is Java not a pure object-oriented language? Java supports primitive data types - byte, boolean, char, short, int, float, long, and double and hence it is not a pure object-oriented language.   3. What is the minimum requirement to run the java program from JVM JDK and JRE?  JDK, because it includes JRE and some other files too.   4. Can java be said to be the complete object-oriented programming language? It is not wrong if we claim that java is the complete object-oriented programming language. Because Everything in Java is under the classes. And we can access that by creating the objects. But also if we say that java is not a completely object-oriented programming language because it has the support of primitive data types like int, float, char, boolean, double, etc. Now for the question: Is java a completely object-oriented programming language? We can say that - Java is not a pure object-oriented programming language, because it has direct access to primitive data types. And these primitive data types don't directly belong to the Integer classes.   5. How is Java different from C++? C++ is only a  compiled language, whereas Java is compiled as well as an interpreted language. Java programs are machine-independent whereas a c++ program can run only in the machine in which it is compiled.  C++ allows users to use pointers in the program. Whereas java doesn’t allow it. Java internally uses pointers.  C++ supports the concept of Multiple inheritances whereas Java doesn't support this. And it is due to avoiding the complexity of name ambiguity that causes the diamond problem.   6. Pointers are used in C/ C++. Why does Java not make use of pointers? Pointers are quite complicated and unsafe to use by beginner programmers. Java focuses on code simplicity, and the usage of pointers can make it challenging. Pointer utilization can also cause potential errors. Moreover, security is also compromised if pointers are used because the users can directly access memory with the help of pointers. Thus, a certain level of abstraction is furnished by not including pointers in Java. Moreover, the usage of pointers can make the procedure of garbage collection quite slow and erroneous. Java makes use of references as these cannot be manipulated, unlike pointers.   7. Does the constructor return any value? The constructor doesn’t return any value as it does not have any return type.   8.  Can we make a constructor final?  Final means no changes be made once initialized so to do use the final keyword with the constructor could cause a problem.  The constructor cannot be final because the constructor cannot be inherited and in the constructor, values are initialized to the variable so this variable changes every time.  A constructor can’t be inherited so can’t be overridden, so there is no use in making the constructor final.   9. What is static in java? Static is a non-access modifier in java which is applicable for the following a. Blocks b. Variables c. Method d. Nested classes   10. Can we override a static method? No, we cannot override a static method java. If a derived class defined a static method with the same signature as the static method in the base class, the method in the derived class hides the method in the base class.   11. Inheritance in java? The process by which one class acquires the properties ( data members ) and functionalities ( Method ) of another class is called inheritance. An object which acquired the properties of another object is called inheritance properties means code & data/method & fields. Type of Inheritance. a. Single Inheritance b. Multilevel Inheritance c. Hierarchical Inheritance d. Hybrid Inheritance   12. Why multiple inheritance is not possible in java?  Java does not support multiple inheritances.  Suppose C is the child class extending from both parent class A and parent class B with the same method defined in them. Then child class cannot understand which class method to call. So there is confusion here which leads to ambiguity and leads to compile time error.  This is the reason java does not support multiple inheritances  Java does not support multiple inheritances. For this java has an interface   13.  Difference between abstract class and inheritance Abstraction Class Interface  A class which is declared with the abstract keyword is known as an abstract class in java The interface in java is a mechanism to achieve abstraction, It can’t have a method body  An abstract class can have abstract and non-abstract method Interface can have only abstract methods  An abstract class can have final, non-final, static and not-static variables Interface has only static and final variable  An abstract class may contain non-final variables Variables declared in a java interface are by default final  An abstract class can be extended using the keyword “extends” Interface can be implemented using the keyword “implements”  A java abstract class can have class members like private, protected, etc Member of a java interface are public by default Abstract class can extend another java class and implement multiple java interface Interface can extend another java interface only   14.  What do you understand by an instance variable and a local variable? Instance variables are those variables that are accessible by all the methods in the class. They are declared outside the methods and inside the class. These variables describe the properties of an object and remain bound to it at any cost. All the objects of the class will have their copy of the variables for utilization. If any modification is done on these variables, then only that instance will be impacted by it, and all other class instances continue to remain unaffected. Example: class Athlete { public String athleteName; public double athleteSpeed; public int athleteAge; } Local variables are those variables present within a block, function, or constructor and can be accessed only inside them. The utilization of the variable is restricted to the block scope. Whenever a local variable is declared inside a method, the other class methods don’t have any knowledge about the local variable. Example: public void athlete() { String athleteName; double athleteSpeed; int athleteAge; }   15. What are the default values assigned to variables and instances in java? There are no default values assigned to the variables in java. We need to initialize the value before using it. Otherwise, it will throw a compilation error of (Variable might not be initialized).  But for instance, if we create the object, then the default value will be initialized by the default constructor depending on the data type.  If it is a reference, then it will be assigned to null.  If it is numeric, then it will assign to 0. If it is a boolean, then it will be assigned to false. Etc.   16. What do you mean by data encapsulation? Data Encapsulation is an Object-Oriented Programming concept of hiding the data attributes and their behaviours in a single unit. It helps developers to follow modularity while developing software by ensuring that each object is independent of other objects by having its own methods, attributes, and functionalities. It is used for the security of the private properties of an object and hence serves the purpose of data hiding.   17.  How is an infinite loop declared in Java? Infinite loops are those loops that run infinitely without any breaking conditions. Some examples of consciously declaring infinite loop is: Using For Loop: for (;;) { // Business logic // Any break logic } Using while loop: while(true){ // Business logic // Any break logic } Using do-while loop: do{ // Business logic // Any break logic }while(true);   18. Define Copy constructor in java. Copy Constructor is the constructor used when we want to initialize the value to the new object from the old object of the same class.  class InterviewBit{    String department;    String service;    InterviewBit(InterviewBit ib){        this.departments = ib.departments;        this.services = ib.services;    } } Here we are initializing the new object value from the old object value in the constructor. Although, this can also be achieved with the help of object cloning.   20. Explain the use of the final keyword in variable, method and class. In Java, the final keyword is used as defining something as constant /final and represents the non-access modifier. final variable: When a variable is declared as final in Java, the value can’t be modified once it has been assigned. If any value has not been assigned to that variable, then it can be assigned only by the constructor of the class. final method: A method declared as final cannot be overridden by its children's classes. A constructor cannot be marked as final because whenever a class is inherited, the constructors are not inherited. Hence, marking it final doesn't make sense. Java throws compilation error saying - modifier final not allowed here final class: No classes can be inherited from the class declared as final. But that final class can extend other classes for its usage.   21. Why is the main method static in Java? The main method is always static because static members are those methods that belong to the classes, not to an individual object. So if the main method will not be static then for every object, It is available. And that is not acceptable by JVM. JVM calls the main method based on the class name itself. Not by creating the object. Because there must be only 1 main method in the java program as the execution starts from the main method. So for this reason the main method is static.    22. What is a ClassLoader? Java Classloader is the program that belongs to JRE (Java Runtime Environment). The task of ClassLoader is to load the required classes and interfaces to the JVM when required.   23. How can we implement any code before the main method? When we need to implement any statements even before object creations at load time of class, we use a static block of code in the class. Any kind of statements which is inside this static block of code gets implemented once at the time of loading the class even before object creation in the main method.   24. What are the two methods of executing multi-threading in Java? Multi-threaded applications are built in Java in any of the following two ways: With Java.Lang.Runnable Interface. Classes execute this interface to authorize multi-threading. There occurs a Run() method in the interface that is executed. Through writing a class which expands Java.Lang.Thread class.   25. How can garbage collection be done in Java? If an object is not referenced anymore in Java, the garbage collection takes place and the object has been eradicated automatically. Java calls either Runtime.gc method or System.gc() method for automatic garbage collection.   26. What is the difference between Vector and an array? Vectors are said to be dynamic in nature and hold the data of various data types while an array gathers data of a similar primitive type that is static in nature.   27. In java why strings are known as Immutable? String objects are known as immutable in java once the value is assigned to a string, it cannot be changed. If it is changed, a new object is created.   28. Define multi-threading It is one of the significant and frequently asked Java Interview Questions Multi-threading is said to be a programming concept to generate multiple tasks within a single program in a concurrent manner. Threads share a stack of the same process and run in parallel. It helps in the performance enhancement of any program.   29. Why is the Runnable Interface used in Java? A runnable interface has been used in java for executing multi-threaded applications. Java.Lang.A runnable interface is executed by a class to support multi-threading.   30. Does main() method in java return any data? The main() method cannot return back any data and thus, it is always declared with a void return type in Java.      

  • Sumasri Sumasri
Manual Testing Interview Questions (Advance Level)
Sep 15, 2022
Manual Testing Interview Questions (Advance Level)

In the software development lifecycle, software testing is an essential activity to verify that the software is functional and adequate. Thus, manual testing is essential to the entire software development process. If you are preparing for a manual or automation testing interview for advanced/intermediate level then please keep on reading. We have prepared a collection of questions to be asked in the interview which can help you with the preparation.   1. What is Test Closure? Test Closure is a document that summarises all of the tests performed throughout the software development life cycle, as well as a full analysis of the defects fixed and errors discovered. The total number of experiments, the total number of experiments executed, the total number of flaws detected, the total number of defects settled, the total number of bugs not settled, the total number of bugs rejected, and so on are all included in this memo.   2..What is Test Harness? A test harness is software and test data used to put a programme unit to the test by running it under various conditions such as stress, load, and data-driven data while monitoring its behaviour and outputs.   3. Explain the defect life cycle. A defect life cycle is a process by which a defect progresses through numerous stages over the course of its existence. The cycle begins when a fault is discovered and concludes when the defect is closed after it has been verified that it will not be recreated.   4. Differentiate between bug leakage and bug release Bug Leakage - When tested software is pushed into the market and the end-user discovers defects, this is known as bug leakage. These are bugs that the testing team overlooked throughout the testing phase. Bug Release - When a certain version of software is launched into the market with some known bugs that are expected to be fixed in later versions, this is known as a bug release. These are low-priority issues that are highlighted in the release notes when sharing with end-users.   5. What is a stub? Many times, when top-down integration testing is performed, lower-level modules are not produced until top-level modules are tested and integrated. Stubs or dummy modules are used in these circumstances to emulate module behaviour by delivering a hard-coded or predicted result based on the input variables.   6. What are the cases when you’ll consider choosing automated testing over manual testing? Automated testing can be considered over manual testing during the following situations: When tests require periodic execution Tests include repetitive steps Tests need to be executed in a standard runtime environment When you have less time to complete the testing phase When there is a lot of code that needs to be repeatedly tested Reports are required for every execution   7. Why is it that the boundary value analysis provides good test cases? The reason why boundary value analysis provides good test cases is that usually, a greater number of errors occur at the boundaries rather than in the centre of the input domain for a test. In the boundary value analysis technique test cases are designed to include values at the boundaries. If the input is within the boundary value, it is considered ‘Positive testing.’ If the input is outside of the boundary value, it is considered ‘Negative testing.’ It includes maximum, minimum, inside or outside edge, typical values or error values. Let’s suppose you are testing for an input box that accepts numbers from ’01 to 10′. Using the boundary value analysis we can define three classes of test cases: Test cases with test data exactly as the input boundaries of input: 1 and 10 (in this case) Values just below the extreme edges of input domains: 0 and 9 Test data with values just above the extreme edges of input domains: 2 and 11   8. What is the average age of a defect in software testing? Defect age is the time elapsed between the day the tester discovered a defect and the day the developer got it fixed. While estimating the age of a defect, consider the following points: The day of birth of a defect is the day it got assigned and accepted by the development team. The issues which got dropped are out of the scope. Age can be both in hours or days. The end time is the day the defect got verified and closed, not just the day it got fixed by the development team.   9. List the different types of severity. The criticality of a bug can be low, medium, or high depending on the context. User interface defects – Low Boundary-related defects – Medium Error handling defects – Medium Calculation defects – High Misinterpreted data – High Hardware failures – High Compatibility issues – High Control flow defects – High Load conditions – High   10. Difference between Bug, Defect, and Error. A slip in coding is indicated as an error. The error spotted by a manual tester becomes a defect. The defect that the development team admits is known as a bug. If a built code misses the requirements, then it is a functional failure.   11. What are functional test cases and non-functional test cases? Functional testing: It is testing the ‘functionality’ of a software or an application under test. It tests the behaviour of the software under test. Based on the requirement of the client, a document called a software specification or requirement specification is used as a guide to testing the application. Non-functional testing: In software terms, when an application works as per the user’s expectation, smoothly and efficiently under any condition, then it is stated as a reliable application. Based on quality, it is very critical to test these parameters. This type of testing is called non-functional testing.   12. How do you test a product if the requirements are yet to be frozen? If the required specifications are not available for a product, then a test plan can be created based on the assumptions made about the product. But we should get all assumptions well-documented in the test plan.   13. Smoke testing It is a kind of quick test carried out on the application to determine whether the application is testable or not.   14. Adhoc testing If you test software without following any procedure and documentation it's called Adhoc testing, it's also called informal testing.   15. Regression testing  It is a process of identifying the  various feature  in the modified built where there is a chance of getting affected and retesting these features   16. What do you know about API Testing? API is an acronym for Application Programming Interface. It gives users access to public classes, functions, and member variables for calling them from external applications. It lays down a model for components to being interaction with each other. API testing comprises three parts: Data-tier (database) Business logic tier (PHP/J2EE) Presentation tier (UI) API testing is also a white-box testing method. It makes use of the code and a programming tool to call the API. It ignores the UI layer of the application and validates the path between the client and the API. The client software forwards a call to the API to get the specified return value. API testing examines whether the system is responding with the correct status or not. API testing got carried out by the testers to confirm the system from end to end. They don’t have permission to get to the source code but can use the API calls. This testing covers authorization, usability, exploratory, automated, and document validation. 17. SDLC divided into two models Sequential ->Waterfall model ,V model Iteration -> RAD (Rapid Application Development), Prototype, Spiral module.   18. Sequential models These modules are best suited for small applications where all development activities are carried out in sequential order for the entire project.   19. Interactive models These models are best suitable for big projects, in which a big project will be divided into modules then the application will be implemented module by module.   20. Agile Model Agile Model project is divided into various sprints Each sprint contains high-priority requirements The time period of the sprint is typically 2 to 3 weeks Daily screening meetings with the team share the status and potential issues. Each sprint is released to the customer User for critical applications   21. Q & A testing Once system Level testing is approved, release the application for user acceptance testing (UAT), Once installed by the customer feedback is obtained for future enhancement and finding defects.   22. Stress testing  Checking the application behaviour under stress conditions, In other words, reducing the system resources and keeping the load constant checking and how the application behaves   23. What are the key elements of a bug report? An ideal bug report should contain the following key points. A unique ID. Defect description – a short description of the bug. Steps to reproduce – include the detailed test steps to emulate the issue. We should also provide the test data and the time of its occurrence. Environment – add any system settings that could help in reproducing the issue. Module/section of the application in which issue has occurred. Severity. Screenshots. Responsible QA – This person is a point of contact in case you want to follow up regarding this issue   24. Is there any difference between Quality Assurance, Quality Control, and Software Testing? What is it? Quality Assurance (QA): QA refers to the planned and systematic way of monitoring the quality of the process which is followed to produce a quality product. QA tracks the outcomes and adjusts the process to meet the expectation. Quality Control (QC) is related to the quality of the product. QC not only finds the defects and suggests improvements also. Thus the process that is set by QA is implemented by QC. QC is the responsibility of the testing team. Software Testing is the process of ensuring that the product which is developed by the developer meets the user requirement. The motive to perform testing is to find the bugs and make sure that they get fixed. Thus it helps to maintain the quality of the product to be delivered to the customer   25. Explain the difference between Smoke testing and Sanity Testing? The main differences between smoke and sanity testing are as follows. Whenever there is a new build delivered after bug fixing, it has to pass through sanity testing. However, smoke testing is done to check the major functionalities of the application. Sanity testing is done either by the tester or the developer. However, smoke testing is not necessarily done by a tester or developer. Smoke tests precede sanity test execution. Sanity testing touches critical areas of the product to ensure the basics are working fine. However, smoke tests include a set of high priority test cases focussing on a particular functionality.   26. What are the severity and priority of a defect? Explain using an example. Priority reflects the urgency of the defect from the business point of view. It indicates – How quickly we need to fix the bug? Severity reflects the impact of the defect on the functionality of the application. Bugs having a critical impact on the functionality require a quick fix. Here are examples which show the bugs under different priority and severity combinations. High Priority and Low Severity. The display of the company logo is not proper on its website. High Priority and High Severity. While making an online purchase, if the user sees a message like “Error in order processing, please try again.” at the time of submitting the payment details. Low Priority and High Severity. Suppose we have a typical scenario in which the application crashes, but such a scenario has a rare occurrence. Low Priority and Low Severity. These are typo errors in the displayed content like “You have registered success”. Instead of “successfully”, “success” is written.    27. What is the role of QA in project development? QA stands for QUALITY ASSURANCE. QA team assures the quality by monitoring the whole development process. QA tracks the outcomes after adjusting the process to meet the expectations. Quality Assurance (QA) does many tasks like the following. Responsible for monitoring the process to be carried out during development. Plans the processes to follow for the test execution phase. Prepares the timetable and agrees on the Quality Assurance plan for the product with the customer. Communicates the QA process to other teams and their members. Ensures traceability of test cases to requirements.   28. Assume you have a test plan with over 1000 test cases. How would you make sure what should be automated and what to test manually? In such a situation, I will focus on test case priority and the feasibility of automation for the test case in question. There can be many other things that can make a difference.  The complicated scenarios are tedious and take a lot of time in manual execution.  The test cases were missed in the past.  The parts of the application that need regression testing. The test cases are hard to automate.  The features are still under development. (If certain parts of the app are about to be changed, I recommend not to start with automated testing for these cases.) The test cases that are part of “explorative” testing and assessing the user experience   29. What is a Test strategy? Test strategy helps to define the testing process that would take place in a software development cycle. It consists of testing tasks, and lets managers and developers know about the issues as and when they get discovered. It includes the following information. Introduction, Resource, Scope and schedule for test activities, Required Test tools, Definition of Test priorities, Test planning and the types of tests to run.   30. What is Testware? Testware is the subset of software, which helps in performing the testing of an application. It is a term given to the combination of Software applications and utilities required for testing a software package.   31. How do you determine which devices and OS versions should we test? A good candidate would point to app analytics as the best measure, looking for the most used devices for their particular app. Another answer would be to check the app reviews where people might have complained about specific issues happening on their devices.   32. What are the main elements of a test plan and test cases? Testing objectives  Testing scope  Testing the frame  The environment  Reason for testing  The criteria for entrance and exit  Deliverables  Risk factors   33. Do you know about bug leakage and bug release? Bug release is when the software or an application is handed over to the testing team knowing that the defect is present in a release. During this, the priority and severity of the bug are low, as it has to be fixed before the final handover. Bug leakage is something when the bug is discovered by the end users or customers and missed by the testing team to detect while testing the software.   34. To what extent should developers do their testing or do you believe testing is the responsibility of the QA team? The answer to this question depends on the business environment in your work. In today’s emerging test scenario, it is also the developer’s responsibility to perform at least some of his code testing. Though it is not expected that he will have the capacity or that his focus should be to run through large test plans or test on a large stack of devices. However, without the responsibility to review and test his code, a sense of ownership will not develop.   We believe that results will improve if all parties have access to test cases and can run and access them regularly to verify if the latest changes brought any regression.   35. What are the roles and responsibilities of a software quality assurance engineer? A software quality assurance engineer has to perform the following tasks:  Understanding of software design  Knowledge of source code  Code review  Version control  Program testing  Integration testing  Release process   36. Who performs Acceptance testing? Internal Acceptance Testing (Aka Alpha Testing) is done by members of the organization that has produced the software but who are not directly involved in the project (Development or Testing). Commonly, it is the members of Product Management, Pre-Sales, and/or Tech Support. External Acceptance Testing is performed by the product consumers who are not employees of the organization that developed the software. They can be some technical people from the client side or the actual end user.   37. What is the scope of Web Testing? Web testing is the name given to Software Testing that focuses on testing web-based applications. Before going to the production environment, the test team performs exhaustive testing of the web applications. This helps to uncover different issues in the application like a functional discrepancy, web application security, web service testing, problems during integration, environmental issues, and its ability to handle the user load. These issues if remain uncovered may get exposed to the public. Thus efforts are made in this stage of testing to find out the possible bugs.   38. What are the most common issues seen in web testing? The following issue may crop up when you do web testing. Functional Issues. Problems that occur while navigating an application.  Usability issues like broken links, form fields missing default focus, tab key not working and all keyboard shortcuts not fully functional. Cosmetic and GUI issues. Performance issues – How much time it takes to display the page to the user? Load – How much load an application can handle at any point in time. Stress – Load that causes an application to crash. The flows of data – Storing of the information entered by the user in the correct format. Proper static information is not displayed along with text fields to enter data.   39. List down the key web application testing techniques? Following is the list of standard testing techniques that we apply to test any web application. Functional Testing – includes link testing, form validation, search operations, and navigation testing. Security Testing – includes authorization check for secure pages, verifying access control and the user making direct entry to the internal page or redirecting to the login page, checking if the session expires after it remains idle for a pre-defined time and testing virus attacks. Database Testing – includes verifying data integrity on creating, updating or deleting data in the database, obtaining a correct result on executing heavy queries, retrieving data from the database and representing on the web pages correctly.  Performance Testing – Check response times of application under different speeds of connections, verify if the site handles many simultaneous user requests at the same time, check how the site handles large input data from users and check how the site pulls through if a crash occurs due to peak load. Usability Testing – includes navigation testing to verify that the Menus, Links or buttons on web pages move to correct pages, and content testing to identify all the spelling and grammatical errors present on the page. Compatibility Testing – includes verification of OS compatibility, browser compatibility, and mobile browsing. Interface Testing – verifies that communication towards all three servers – The Web, Application, and Database Server is working fine. Check if any request interrupts in-between then how the application is responding. Handle any error from the web or database server to the application server and display the correct error message to the user.   40. List the main differences between client-server, the web and desktop applications.   Desktop application. The application runs in single memory with Front-end and Back-end in one place. It has a single user only. Client/Server application. The application runs on two or more machines. It is menu-driven. Works in connected mode ( that means connection exists until logout). It has a limited number of users. It has fewer network issues as compared to the web app. Web application. The application runs on two or more machines. It is URL-driven. It uses a web browser as the client interface. Works in disconnected mode (stateless). It has an unlimited number of users. It has many issues like hardware compatibility, browser compatibility, version compatibility, security issues, and performance issues.   41. Functionality verification for testing the web application   A- Testing Links which include. i. Internal Links. ii. External Links. iii. Mail Links. iv. Broken Links. B- Form validation includes. i. Field validation. ii. Display error message for wrong input. iii. Verification of optional and mandatory fields. C- Database. i. Testing the database integrity. D- Cookies. i. Testing will be done on the client system side, on the temporary Internet files.     42. Performance verification on web testing applications. Performance testing can be applied to understand the website’s scalability or to benchmark the performance in the environment of third-party products such as servers and middleware for potential purchase. A- Connection Speed. Testing was done on various networks like Dial-up and ISDN. B- Load. i. A Huge number of users accessing the application at the same time. ii. Check for peak loads and how the system behaves. iii. A Large amount of data accessed by a user. C- Stress. i. Apply continuous load on the system. ii. Verify the performance of memory, CPU, and file handling.   43. What is the Security Testing involved? Security testing involves the following. i. Network Scanning. ii. Vulnerability Scanning. iii. Password Cracking. iv. Log Review. v. Integrity Checkers. vi. Virus Detection.   44. What is the difference between a static and dynamic website?  The main differences between Static and Dynamic websites are as follows. A Static website contains web pages with fixed content whereas, in Dynamic website content of the web page changes with respect to time. It’s not difficult to build a static website as you don’t require any database design. But developing a dynamic website requires good programming resources and database knowledge. A static website doesn’t support user communication as it displays the same information to each one of them. Whereas, in the case of dynamic websites, users may communicate with each other   45. Explain Cross Site Scripting? Cross-Site Scripting is a thread in the dynamic website. It is also known as XSS. It occurs when a web application gathers malicious data from a user. Data collection happens in a hyperlinked form which contains malicious content within it. It allows the insertion of malicious code into the web page. The web page can be a simple HTML code or a client-side script. Suppose a user, accidentally clicks on a web page containing the malicious code then that code becomes part of the web request of the user. This request can also execute on the user’s computer and steal confidential information   46. What are the different tools that you use for web testing? Below is the list of the most popular web testing tools available nowadays. And we are using them frequently to run web tests. JMeter (mainly load and performance testing tool) – It is a Java desktop application which is useful to create the load test environment. It measures the performance of the application during the load test. And it is capable of testing the performance of both static and dynamic websites. Selenium (Web app testing tool ) – It is a framework for automated testing of web applications. It’s not just a single tool but a suite of software each catering to different testing needs. Its components include Selenium IDE, Selenium Remote Control, Selenium Webdriver, and Selenium Grid to examine and evaluate the web application. Nowadays, Selenium RC and Webdriver have merged into Selenium 2.   47. Do you know about the tools used for analyzing HTTP traffic? Yes, we often need to track the HTTP requests that flow from the browser to the downstream web server. Also, by probing the network traffic, we can get to the details of each request/response and cross verify. Next, many tools are available in the market for monitoring Web traffic. I can name some of them which are open source and frequently used. Wireshark – It’s to check all data that passes through the network. Fiddler – It is more useful for analyzing the HTTP/s-only traffic. Live HTTP Headers – It’s a Firefox add-on which is helpful for previewing the HTTP headers. FireBug – It’s the most popular Firefox plugin which can monitor AJAX transactions. Though, an essential feature is to fetch the Web element locators. BrowserMob Proxy – It adds additional functionality to Selenium Webdriver for running automated tests.   48. What is the difference between High level and Low-Level test cases? High-level test cases cover the core functionality of a product like standard business flows. Low-level test cases are those related to the user interface (UI) in the application.   49. What is a Business Requirements Document (BRD)? BRD provides a complete business solution for a project, including the documentation of customer needs and expectations. BRD fulfils the following objectives. Gain agreement with stakeholders. Provide clarity on the business requirements. Describe the solution that meets the customer/business needs. Determine the input for the next phase of the project.   50. What is globalization testing? Globalization testing concentrates on detecting the potential problems in the product design that could spoil globalization. It certifies that the code can handle the desired international support without breaking any functionality. And also, it ensures that there would be no data loss and display problems.   Please note that these top 50 questions are only meant to be used as guidance. We recommend that along with being thorough with the subject, in theory, you are also aware of the latest developments and key trends in the area.  

  • Sumasri Sumasri
Manual Testing Interview Questions (Basic Level)
Sep 06, 2022
Manual Testing Interview Questions (Basic Level)

The success of any software product in today's competitive environment depends on testing. If you are preparing for a Junior level manual testing interview then please keep on reading. We have prepared a collection of questions to be asked in the interview which can help you with the preparation.   1. Define Errors: Any incorrect human action that produces a problem in the system.   2. Define Defect: Deviation between expected behaviour to the actual behaviour of the system.   3. Define Failure: Deviation identified by the end-user while using a system.   4. Why does software have defects? Incorrect requirements Wrong design Poor coding Complex business logic Complex technology Frequently changing requirements   5. Testing It is a process of verifying whether we are developing the right product or not and also validating if the developed product is right or not.   6. Stating testing /verification It's a process of verifying whether are we developing the right product or not   7. Validation /dynamic testing It's a process of validating whether the developed product is right or not.   8. Software testing techniques Static testing Dynamic testing white box testing Black box testing /Grey box testing   9. Levels of testing Unit /Component testing Integration testing System testing Acceptance testing   10. White box test Testing is conducted on the source code by the developer to check if the source code is working as expected or not.   11. Black box testing white box testing is generally done by the developer, whereas black box testing is done by test engineers.   12. Smoke testing It is a kind of quick test carried out on the application to determine whether the application is testable or not.   13. Adhoc testing If you test software without following any procedure and documentation it's called Adhoc testing,it's also called informal testing   14. Regression testing  It is a process of identifying the  various feature  in the modified build where there is a chance of getting affected and retesting these features   15. Exploratory testing Understanding the system, modifying the test cases and executing those changes.   16. Non -Functional testing Validating the various non-functional aspects of the system such as interfaces, user friendly, security, load, stress, compatibility and performance etc.   17. Globalisation testing  Checking if the application has a provision for setting and changing languages date and time format, currency format etc. It is designed for a global user.   18. Software testing life cycle (STLC) /Manual testing procedure. Planning and Control Analysis and Design Implementation and Execution Evaluating exit criteria and Reporting Test Closure activities   19. Test plan: It is a day-to-day work plan that explains the scope, approach resources and work schedule etc. The test plan can be prepared by the test lead.   20. Test design techniques Equivalence class partition (ECP) Boundary value analysis (BVA) decision table. state transition testing Use Case testing   21. Requirement traceability matrix (RTM) Mapping between test cases and requirements is called a traceability matrix.   22. High servility Runtime error, show stopper, Once the function is not working   23. Low severity Bugs, Font, colours, Cosmetic etc.   24. Defect Age  The time interval between the date of detection and the date of closure is called defect age.   25. SDLC divided into two models Sequential ->Waterfall model ,V model teration -> RAD (Rapid Application development),Prototype, Spiral module.   26. Sequential models These modules are best suited for small applications where all development activities are carried out in sequential order for the entire project.   27. Interactive models These models are best suitable for big projects, in which a big project will be divided into modules then the application will be implemented module by module.   28. Waterfall model It is a beginning approach to a development module where all development activities are carried out one after the other for the entire project.   29. Agile Model Agile Model project is divided into various sprints Each sprint contains high  priority requirements The time period of the sprint is typically 2 to 3 weeks Daily screening meetings with the team share the status and potential issues. Each sprint is released to the customer User for critical applications   30. Q & A testing Once system Level testing is approved, release the application for user acceptance testing (UAT), Once installed by the customer feedback is obtained for future enhancement and finding defects.   31. Stress testing  checking the application behaviour under stress conditions, In other words, reducing the system resources and keeping the load constant checking how the application behaves   32. Priority  Defines the importance of defects with respect to the client's point of view, which means how soon they should be fixed. p1 Urgent p2 high p3 Medium p4 Low . 33. Severity Critical  Major  Moderate Minimum    34. What is the test case? A test case is a document that has a set of conditions or actions that are performed on the software application in order to verify the expected functionality of the feature.   35. What’s the difference between verification and validation in testing? Verification  Validation It is a static analysis technique. Here, testing is done without executing the code. Examples include – Reviews, Inspection, and walkthroughs. It is a dynamic analysis technique where testing is done by executing the code. Examples include functional and non-functional testing techniques.   36. What is API testing? API testing is a type of software testing where application programming interfaces (APIs) are tested to determine if they meet expectations for functionality, reliability, performance, and security. In simple terms, API testing is intended to reveal bugs, inconsistencies or deviations from the expected behaviour of an API.   37. What are the advantages of manual testing? Merits of manual testing are: It is a cheaper way of testing when compared to automated testing Analysis of the product from the point of view of the end-user is possible only with manual testing GUI testing can be done more accurately with the help of manual testing as visual accessibility and preferences are difficult to automate East to learn for new people who have just entered into testing It is highly suitable for short-term projects when test scripts are not going to be repeated and reused for thousands of times Best suited when the project is at the early stages of its development Highly reliable, since automated tests can contain errors and missed bugs   38. What are the drawbacks of manual testing? De-merits of manual testing are: Highly susceptible to human error and are risky Test types like load testing and performance testing are not possible manually Regression tests are really time-consuming if they are done manually The scope of manual testing is very limited when compared to automation testing Not suitable in very large organizations and time-bounded projects The cost adds up, so, it’s more expensive to test manually in the long run   39. When should you stop the testing process? The testing activity ends when the testing team completes the following milestones. Test case execution The successful completion of a full test cycle after the final bug fix marks the end of the testing phase. Testing deadline The end date of the validation stage also declares the closure of the validation if no critical or high-priority defects remain in the system. Code Coverage(CC) ratio It is the amount of code concealed via automated tests. If the team achieves the intended level of code coverage (CC) ratio, then it can choose to end the validation. Mean Time Between Failure (MTBF) rate Mean time between failure (MTBF) refers to the average amount of time that a device or product functions before failing. This unit of measurement includes only operational time between failures and does not include repair times, assuming the item is repaired and begins functioning again. MTBF figures are often used to project how likely a single unit is to fail within a certain period of time   40. Mention the different types of software testing. Various types of Software Testing used by manual testers are as follows: Unit testing Integration testing Regression testing Shakeout testing Smoke testing Functional testing Performance testing Load testing Stress testing Endurance testing  White-box and Black-box testing  Alpha and Beta testing System testing   41. What is the purpose of end-to-end testing? End-to-end testing is a testing strategy to execute tests that cover every possible flow of an application from its start to finish. The objective of performing end-to-end tests is to discover software dependencies and to assert that the correct input is getting passed between various software modules and sub-systems.   42. What kind of skills are needed for someone to become a software tester?  Software testers need skills such as: Problem-solving skills Excellent written and verbal communication skills Detail-oriented Able to handle the pressure Can work solo or as a team member equally well Organizational skills Related technical skills   43. Explain the difference between alpha testing and beta testing. Alpha testing is at the developer’s site before release. Potential clients conduct beta testing at their websites.   44. What’s a testbed? It’s not furniture. A testbed is an environment used for testing an application, including the hardware as well as any software needed to run the program to be tested.   45. What’s GUI testing? This tests the interface between the software and the end-user. Short for Graphics User Interface.   46. Define what is a critical bug. A critical bug is a bug that has got the tendency to affect a majority of the functionality of the given application. It means a large piece of functionality or major system component is completely broken and there is no workaround to move further. The application cannot be distributed to the end client unless the critical bug is addressed.   47. Why is it impossible to test a program thoroughly or in other terms 100% bug-free? It is impossible to build a software product which is 100% bug-free. You can just minimize the error, flaw, failure or fault in a computer program or system that causes it to produce an incorrect or unexpected result. Here are the two principal reasons that make it impossible to test a program entirely. Software specifications can be subjective and can lead to different interpretations. A software program might require too many inputs, too many outputs, and too many path combinations to test.   48. What is a top-down and bottom-up approach in testing? Top-Down – Testing happens from top to bottom. That is, high-level modules are tested first and after that low-level modules. Lastly, the low-level modules are incorporated into a high-level state to guarantee the framework is working as it is expected to. Bottom-Up – Testing happens from base levels to high-up levels. The lowest level modules are tested first and afterwards high-level state modules. Lastly, the high-level state modules are coordinated to a low level to guarantee the framework is filling in as it has been proposed.   49. Is it true that we can do system testing at any stage? In system testing, all the components of the software are tested as a whole in order to ensure that the overall product meets the requirements specified. So, no. The system testing must start only if all units are in place and are working properly. System testing usually happens before the UAT (User Acceptance Testing).   50. Is there any difference between retesting and regression testing? Possible differences between retesting and regression testing are as follows: We perform retesting to verify the defect fixes. But, the regression testing assures that the bug fix does not break other parts of the application. Regression test cases verify the functionality of some or all modules. Regression testing ensures the re-execution of passed test cases. Whereas, retesting involves the execution of test cases that are in a failed state. Retesting has a higher priority over regression. But in some cases, both get executed in parallel.   51. Differentiate between Positive and Negative Testing  Positive Testing Negative Testing  Positive testing ensures that your software performs as expected. The test fails if an error occurs during positive testing. Negative testing guarantees that your app can gracefully deal with unexpected user behaviour or incorrect input.   In this testing, the tester always looks for a single set of valid data. Testers use as much nega ingenuity as possible when validating the app against erroneous data.   Please note that these top 51 questions are only meant to be used as guidance. We recommend that along with being thorough with the subject, in theory, you are also aware of the latest developments and key trends in the area.  

  • Sumasri Sumasri
  • 1 (current)
×
  • Home
  • About
  • Jobs
  • Events
  • Courses
  • Exams
  • Blog
  • Recruiter
  • Pricing

  Applicant

  • Login
  • Register
  • Forgot Password

* By proceeding you agree to our Privacy Policy and Terms of Use
*
*
*
*
Password should contain one upper case,one lower case,one number and one special character with 8-30 characters.

* By proceeding you agree to our Privacy Policy and Terms of Use

  Advertiser

  • Login
  • Register
  • Forgot your password

* By proceeding you agree to our Privacy Policy and Terms of Use
*
*
*
*
Password should contain one upper case,one lower case,one number and one special character with 8-30 characters.

* By proceeding you agree to our Privacy Policy and Terms of Use
  • about
  • privacy
  • terms of use
  • careers
  • contact us
  • sitemap

© 2021 Botmatrix Services Private Limited. All Rights Reserved.