June 3, 2025

Object Oriented Programming

OOP allow decomposition of a problem into a number of entities called Object and then builds data and function around these objects.

  • The Program is divided into number of small units called Object. The data and function are build around these objects.
  • The data of the objects can be accessed only by the functions associated with that object.
  • The functions of one object can access the functions of other object.

 The main idea behind Object Oriented Programming is simplicity, code reusability, extendibility, and securityThese are achieved through Encapsulation, abstraction, inheritance, and polymorphism



Abstraction( display only relevant infohas to do with displaying only the relevant aspect to the user, for example, turning on the radio, but you don't need to know how the radio works. Abstraction ensures simplicity.

Abstraction is achieved in either Abstract classes or interface in Java and Python.


Inheritance (code reuse) 
has to do with methods and functions inheriting the attributes of another class. The main aim is code reuse which ensures that programs are developed faster. DRY (don’t Repeat yourself) is a concept in inheritance which imply that in a program, you should not have different codes that are similar. Instead, have one class and use other methods to call them and extend the functionalities where necessary. 

Polymorphism (many forms) allows program code to have different meaning or functions.

Encapsulation (Data-Hiddenis the process of keeping classes private so they cannot be modified by external codes. For example, if a developer wants to use a dynamic link library to display date and time, he does not have to worry about the codes in the date and time class rather he would simply use the data and time class by using public variables to call it up.

With this approach, a class can be updated or maintained without worrying about the methods using them. If you are calling up a class in ten methods and you need to make changes, you don’t have to update the entire methods rather you update a single class. Once the class is changed, it automatically updates the methods accordingly. Encapsulation also ensures that your data is hidden from external modification.

https://dotnettutorials.net/lesson/encapsulation-csharp/





Web development

 🎨 Frontend Development (Client-Side)

🔹 HTML – Structures web pages.

🔹 CSS – Styles and designs pages (responsive layouts, animations).

🔹 JavaScript – Adds interactivity and dynamic content.

🔹 Frameworks – React, Vue.js, Angular for scalable UI development.

🔹 Responsive Design – Ensures compatibility across different device

Javascript Tips

JavaScript ES6 — 5 Cool Features You Should Know!

1️⃣ let & const
let x = 10;
const y = 20;

2️⃣ Arrow Function
const add = (a, b) => a + b;

3️⃣ Template Strings
let name = "Ali";
console.log(Hello, ${name}!);

4️⃣ Destructuring : 
Extract values from arrays/objects in one line
const [a, b] = [1, 2];
const {name, age} = {name: "Sara", age: 25};

5️⃣ Default Parameters : 
Set default values in functions like function greet(name = "Guest") to avoid undefined errors.
function greet(name = "Friend") {
  console.log("Hi " + name);
}

Digital Clock – Show current time live with JavaScript.

 <!DOCTYPE html>

<html>

<head>

<title>Digital Clock</title>

</head>

<body>

  <div id="clock"></div>

  <script src="script.js"></script>

</body>

</html>

HTML

 1. What is HTML?

HTML (HyperText Markup Language) is the standard language used to create and structure content on the web. It defines the layout of web pages using elements like headings, paragraphs, images, links, and more.

2. What is the basic structure of an HTML document?

<!DOCTYPE html>

<html>

  <head>

    <title>Page Title</title>

  </head>

  <body>

    <h1>This is a heading</h1>

    <p>This is a paragraph.</p>

  </body>

</html>


<!DOCTYPE html> – defines the document type.

<html> – root of the HTML document.

<head> – contains metadata and the page title.

<body> – contains the content displayed on the page.


3. What is the difference between <div> and <span>?

<div> is a block-level element used for grouping larger chunks of content.

<span> is an inline element used for styling or scripting small portions within text.

Example:

<div>This is a block element</div>

<p>This is a <span>highlighted</span> word.</p>


4. What are semantic HTML tags?

Semantic tags clearly describe their meaning in a human and machine-readable way.

Examples include:

<header>, <footer>, <article>, <section>, <nav>

Benefit: They improve accessibility and SEO.


5. What is the purpose of the alt attribute in an <img> tag?

The alt (alternative text) attribute describes the image when it can't be displayed. It is important for accessibility and screen readers.

<img src="logo.png" alt="Company Logo">


6. How do you create a hyperlink in HTML?

Answer: Use the <a> tag with the href attribute.

<a href="https://www.example.com">Visit Example</a>


7. What is the difference between id and class in HTML?

id is unique and used to identify a single element.

class is reusable and used to group multiple elements.

<p id="intro">This is unique</p>

<p class="highlight">This is styled</p>


8. What is the role of the <meta> tag in HTML?

<meta> tags provide metadata about the HTML document, such as character set, viewport settings, or SEO information.

Example:

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

9. What is the use of the <form> tag?

Answer:

The <form> tag is used to collect user input and send it to a server.

Example:

<form action="/submit" method="POST">

  <input type="text" name="username">

  <button type="submit">Submit</button>

</form>


10. What are void elements in HTML?

Void elements are self-closing elements that don't need a closing tag.

Examples: <br>, <hr>, <img>, <input>, <meta>

April 22, 2020

what is digital worker in automation anywhere?

Digital Worker has a set of skills that automate parts of a traditionally defined job role. These new virtual employees can help offload repetitive, high-volume work by thinking, acting, and analyzing in ways humans do — allowing us humans to accomplish work that is more stimulating.


August 21, 2019

Understanding Database Scalability – Vertical and Horizontal

MongoDB - Commands (document database)

show dbs
use myDB
show collections
db.createCollection("users")
db.users.drop()

Insert Documents
db.users.insertOne({ name: "Alice", age: 30 });
db.users.insertMany([
{ name: "Bob", age: 25 },
{ name: "Charlie", age: 35 }
]);

Find (Read Data)
db.users.find();
db.users.find({ age: { $gt: 25 } });
db.users.find({ name: "Alice", age: 30 });
db.users.find({}, { name: 1, _id: 0 });
db.users.find().sort({ age: -1 });
db.users.find().limit(5);

Update Documents
db.users.updateOne({ name: "Alice" }, { $set: { age: 31 } });
db.users.updateMany({ age: { $lt: 30 } }, { $set: { status: "young" } });
db.users.replaceOne({ name: "Alice" }, { name: "Alicia", age: 32 });

Delete Documents
db.users.deleteOne({ name: "Alice" });
db.users.deleteMany({ age: { $lt: 25 } });

Aggregation
db.users.aggregate([
{ $group: { _id: "$age", count: { $sum: 1 } } }
]);
db.users.aggregate([
{ $match: { age: { $gt: 25 } } },
{ $project: { name: 1, age: 1 } }
]);

Comparison Operators
$eq, $ne, $gt, $gte, $lt, $lte, $in, $nin
db.users.find({ age: { $gte: 25, $lte: 35 } });

Logical Operators
$and, $or, $not
db.users.find({ $and: [{age: {$gt: 25}}, {status: "active"}] });

Array Operators
db.users.find({ tags: { $in: ["admin"] } });
db.users.find({ tags: ["admin", "user"] });
db.users.find({ tags: { $size: 2 } });
db.users.updateOne({ name: "Alice" }, { $push: { tags: "newbie" } });

Indexes
db.users.createIndex({ name: 1 });
db.users.dropIndex({ name: 1 });
db.users.getIndexes();

March 4, 2019

RPA Tool evaluation

If you want to evaluate the RPA tool then below things need to be consider
  1. Pricing
  2. Type of application can automate
  3. Ease of use
  4. Maintenance and support of BOT
  5. Deployment of Bot and Code synch
  6. Security
  7. scalability (number of bots can deploy)
  8. Vendor experience and use cases
  9. Time require to develop a BOT
  10. Number of resources available in the market

November 20, 2018

Call VBscript + Javascript in Automation anywhere

VbScript

Dim a
Dim b
Dim c

a = WScript.Arguments.Item(0)
b = WScript.Arguments.Item(1)
c= Cint(a) + Cint(b)

Wscript.Stdout.Writeline(c)

-------------------------------------------------------
Javascript

var args = WScript.Arguments;

if (args.length > 0)

    var val=0;
    var str=args.item(0);
    var ary = str.split(",");
    for (var i=0; i < ary.length; i++)
    {
         val += parseInt(ary[i]);
    }

   WScript.StdOut.WriteLine(val);
}